File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -148,8 +148,16 @@ func (p *HTTPPool) ServeHTTP(w http.ResponseWriter, r *http.Request) {
148148 http .Error (w , "bad request" , http .StatusBadRequest )
149149 return
150150 }
151- groupName := parts [0 ]
152- key := parts [1 ]
151+ groupName , err := url .QueryUnescape (parts [0 ])
152+ if err != nil {
153+ http .Error (w , "bad request" , http .StatusBadRequest )
154+ return
155+ }
156+ key , err := url .QueryUnescape (parts [1 ])
157+ if err != nil {
158+ http .Error (w , "bad request" , http .StatusBadRequest )
159+ return
160+ }
153161
154162 // Fetch the value for this group/key.
155163 group := GetGroup (groupName )
@@ -164,7 +172,7 @@ func (p *HTTPPool) ServeHTTP(w http.ResponseWriter, r *http.Request) {
164172
165173 group .Stats .ServerRequests .Add (1 )
166174 var value []byte
167- err : = group .Get (ctx , key , AllocatingByteSliceSink (& value ))
175+ err = group .Get (ctx , key , AllocatingByteSliceSink (& value ))
168176 if err != nil {
169177 http .Error (w , err .Error (), http .StatusInternalServerError )
170178 return
You can’t perform that action at this time.
0 commit comments