瀏覽代碼

etcdserver/etcdhttp: be specific about the keys path match

Blake Mizerany 11 年之前
父節點
當前提交
07058d3e0b
共有 1 個文件被更改,包括 1 次插入1 次删除
  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 {
 	case strings.HasPrefix(r.URL.Path, "/raft"):
 		h.serveRaft(ctx, w, r)
-	case strings.HasPrefix(r.URL.Path, "/keys"):
+	case strings.HasPrefix(r.URL.Path, "/keys/"):
 		h.serveKeys(ctx, w, r)
 	default:
 		http.NotFound(w, r)