File tree 1 file changed +11
-3
lines changed
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) {
148
148
http .Error (w , "bad request" , http .StatusBadRequest )
149
149
return
150
150
}
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
+ }
153
161
154
162
// Fetch the value for this group/key.
155
163
group := GetGroup (groupName )
@@ -164,7 +172,7 @@ func (p *HTTPPool) ServeHTTP(w http.ResponseWriter, r *http.Request) {
164
172
165
173
group .Stats .ServerRequests .Add (1 )
166
174
var value []byte
167
- err : = group .Get (ctx , key , AllocatingByteSliceSink (& value ))
175
+ err = group .Get (ctx , key , AllocatingByteSliceSink (& value ))
168
176
if err != nil {
169
177
http .Error (w , err .Error (), http .StatusInternalServerError )
170
178
return
You can’t perform that action at this time.
0 commit comments