Skip to content
This repository has been archived by the owner on Apr 24, 2018. It is now read-only.

Parameters specified in the routes themselves are never decoded #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@ func (m *RouteMux) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
//add url parameters to the query param map
values := r.URL.Query()
for i, match := range matches[1:] {
values.Add(route.params[i], match)
value, err := url.QueryUnescape(match)
if err != nil {
values.Add(route.params[i], match)
} else {
values.Add(route.params[i], value)
}
}

//reassemble query params and add to RawQuery
Expand Down