Add test and fix for escaped query values.

Reproduces and fixes #238.
This commit is contained in:
Chris Hines
2017-05-30 15:55:47 -04:00
committed by Kamil Kisiel
parent c7a138dbc1
commit 18fca31550
2 changed files with 12 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ func newRouteRegexp(tpl string, matchHost, matchPrefix, matchQuery, strictSlash,
// Now let's parse it.
defaultPattern := "[^/]+"
if matchQuery {
defaultPattern = "[^?&]*"
defaultPattern = ".*"
} else if matchHost {
defaultPattern = "[^.]+"
matchPrefix = false