From 976d66a1f195a90b06268c7d89a6e85c526eef47 Mon Sep 17 00:00:00 2001 From: Dvir Volk Date: Tue, 1 Apr 2014 13:43:40 +0300 Subject: [PATCH] removed extra unesacping in http pool that screwed up the keys we were using --- http.go | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/http.go b/http.go index ae69a63..13b148e 100644 --- a/http.go +++ b/http.go @@ -109,16 +109,8 @@ func (p *HTTPPool) ServeHTTP(w http.ResponseWriter, r *http.Request) { http.Error(w, "bad request", http.StatusBadRequest) return } - groupName, err := url.QueryUnescape(parts[0]) - if err != nil { - http.Error(w, "decoding group: "+err.Error(), http.StatusBadRequest) - return - } - key, err := url.QueryUnescape(parts[1]) - if err != nil { - http.Error(w, "decoding key: "+err.Error(), http.StatusBadRequest) - return - } + groupName := parts[0] + key := parts[1] // Fetch the value for this group/key. group := GetGroup(groupName) @@ -133,7 +125,7 @@ func (p *HTTPPool) ServeHTTP(w http.ResponseWriter, r *http.Request) { group.Stats.ServerRequests.Add(1) var value []byte - err = group.Get(ctx, key, AllocatingByteSliceSink(&value)) + err := group.Get(ctx, key, AllocatingByteSliceSink(&value)) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return