Merge pull request #840 from smarterclayton/missing_return_in_watch

Watch handler not returning after 404
This commit is contained in:
Daniel Smith 2014-08-09 16:05:03 -07:00
commit e35dfedd79

View File

@ -55,10 +55,12 @@ func (h *WatchHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
parts := splitPath(req.URL.Path)
if len(parts) < 1 || req.Method != "GET" {
notFound(w, req)
return
}
storage := h.storage[parts[0]]
if storage == nil {
notFound(w, req)
return
}
if watcher, ok := storage.(ResourceWatcher); ok {
label, field, resourceVersion := getWatchParams(req.URL.Query())