Browse Source

getUrlQuery: Use SplitN with a max of 2.

Kamil Kisiel 11 years ago
parent
commit
ba336c9cfb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      regexp.go

+ 1
- 1
regexp.go View File

@ -186,7 +186,7 @@ func (r *routeRegexp) getUrlQuery(req *http.Request) string {
if !r.matchQuery {
return ""
}
templateKey := strings.Split(r.template, "=")[0]
templateKey := strings.SplitN(r.template, "=", 2)[0]
for key, vals := range req.URL.Query() {
if key == templateKey && len(vals) > 0 {
return key + "=" + vals[0]


Loading…
Cancel
Save