Watch handler not returning after 404

This commit is contained in:
Clayton Coleman 2014-08-09 10:46:56 -04:00
parent c71866164f
commit d419eedb06

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())