Browse Source

etcdserver/etcdhttp: be specific about the keys path match

Blake Mizerany 11 years ago
parent
commit
07058d3e0b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      etcdserver2/etcdhttp/http.go

+ 1 - 1
etcdserver2/etcdhttp/http.go

@@ -39,7 +39,7 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 	switch {
 	switch {
 	case strings.HasPrefix(r.URL.Path, "/raft"):
 	case strings.HasPrefix(r.URL.Path, "/raft"):
 		h.serveRaft(ctx, w, r)
 		h.serveRaft(ctx, w, r)
-	case strings.HasPrefix(r.URL.Path, "/keys"):
+	case strings.HasPrefix(r.URL.Path, "/keys/"):
 		h.serveKeys(ctx, w, r)
 		h.serveKeys(ctx, w, r)
 	default:
 	default:
 		http.NotFound(w, r)
 		http.NotFound(w, r)