From 5beab27eabb74f9683e59476bb7ce9f91c8fe543 Mon Sep 17 00:00:00 2001 From: Tianle Xu Date: Mon, 31 Aug 2020 10:45:58 +0800 Subject: [PATCH] fix(kvd): path error --- unikvd/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unikvd/main.go b/unikvd/main.go index b5dbf98..99bb035 100644 --- a/unikvd/main.go +++ b/unikvd/main.go @@ -95,11 +95,11 @@ func handle(rw http.ResponseWriter, r *http.Request) { rw.Header().Add("Server", "UniKVd") uri := strings.Split(r.URL.RequestURI(), "?")[0] sp := strings.Split(strings.Trim(uri, "/"), "/") - if len(sp) != 3 { + if len(sp) != 4 { resp404(rw) return } - nsName, bucketName, key := sp[0], sp[1], sp[2] + nsName, bucketName, key := sp[1], sp[2], sp[3] if nsName == "_system" { switch bucketName { case "lifecycle":