Skip to content

Commit

Permalink
Unescape request URL before matching url
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcnunes committed Aug 29, 2017
1 parent 7199ef5 commit e90b23b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion httpfake.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"fmt"
"net/http"
"net/http/httptest"
netURL "net/url"
"strings"
)

Expand Down Expand Up @@ -69,7 +70,7 @@ func (f *HTTPFake) findHandler(r *http.Request) *Request {
continue
}

rhURL := rh.URL.String()
rhURL, _ := netURL.QueryUnescape(rh.URL.String())
if rhURL == url {
return rh
}
Expand Down

0 comments on commit e90b23b

Please sign in to comment.