Skip to content

Commit e90b23b

Browse files
committed
Unescape request URL before matching url
1 parent 7199ef5 commit e90b23b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

httpfake.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"fmt"
1010
"net/http"
1111
"net/http/httptest"
12+
netURL "net/url"
1213
"strings"
1314
)
1415

@@ -69,7 +70,7 @@ func (f *HTTPFake) findHandler(r *http.Request) *Request {
6970
continue
7071
}
7172

72-
rhURL := rh.URL.String()
73+
rhURL, _ := netURL.QueryUnescape(rh.URL.String())
7374
if rhURL == url {
7475
return rh
7576
}

0 commit comments

Comments
 (0)