File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -380,11 +380,12 @@ func (r *routes) matcher(w http.ResponseWriter, req *http.Request) {
380
380
Value : mustLabelValue (req .Context ()),
381
381
}
382
382
383
+ var q url.Values
383
384
if req .Method == http .MethodPost && req .Header .Get ("Content-Type" ) == "application/x-www-form-urlencoded" {
384
385
if err := req .ParseForm (); err != nil {
385
386
return
386
387
}
387
- q : = req .PostForm
388
+ q = req .PostForm
388
389
if err := injectMatcher (q , matcher ); err != nil {
389
390
return
390
391
}
@@ -394,13 +395,13 @@ func (r *routes) matcher(w http.ResponseWriter, req *http.Request) {
394
395
req .Body = ioutil .NopCloser (strings .NewReader (newBody ))
395
396
req .ContentLength = int64 (len (newBody ))
396
397
} else {
397
- q : = req .URL .Query ()
398
+ q = req .URL .Query ()
398
399
if err := injectMatcher (q , matcher ); err != nil {
399
400
return
400
401
}
401
- req .URL .RawQuery = q .Encode ()
402
402
}
403
403
404
+ req .URL .RawQuery = q .Encode ()
404
405
r .handler .ServeHTTP (w , req )
405
406
}
406
407
You can’t perform that action at this time.
0 commit comments