From b7d408dfa43a15c6b97e35a72a54b23e8880d8c9 Mon Sep 17 00:00:00 2001 From: Tim Pierce Date: Fri, 11 Apr 2014 18:01:14 -0400 Subject: [PATCH] Fix nil map bug and status.json route. (refs #2561) --- services/keep/keep.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/keep/keep.go b/services/keep/keep.go index 1ea8240861..03f0b8f77e 100644 --- a/services/keep/keep.go +++ b/services/keep/keep.go @@ -107,7 +107,7 @@ func main() { rest.HandleFunc(`/{hash:[0-9a-f]{32}}`, PutBlockHandler).Methods("PUT") rest.HandleFunc(`/index`, IndexHandler).Methods("GET", "HEAD") rest.HandleFunc(`/index/{prefix:[0-9a-f]{0,32}}`, IndexHandler).Methods("GET", "HEAD") - rest.HandleFunc(`/status\.json`, StatusHandler).Methods("GET", "HEAD") + rest.HandleFunc(`/status.json`, StatusHandler).Methods("GET", "HEAD") // Tell the built-in HTTP server to direct all requests to the REST // router. @@ -240,6 +240,7 @@ func StatusHandler(w http.ResponseWriter, req *http.Request) { } } + st.Volumes = make(map[string]VolumeStatus) for _, vol := range KeepVolumes { st.Volumes[vol] = GetVolumeStatus(vol) } -- 2.30.2