From ba336c9cfb43552c90de6cb2ceedd3271c747558 Mon Sep 17 00:00:00 2001 From: Kamil Kisiel Date: Fri, 17 Jul 2015 08:03:03 -0700 Subject: [PATCH] getUrlQuery: Use SplitN with a max of 2. --- regexp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regexp.go b/regexp.go index b300730..7c636d0 100644 --- a/regexp.go +++ b/regexp.go @@ -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]