diff --git a/router.go b/router.go index a083de1..28078b6 100644 --- a/router.go +++ b/router.go @@ -313,11 +313,7 @@ func callHandler(handler interface{}, pathArray []string, handerObj *RouteHandle } func (r *SimpleRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) { - url := req.URL.String() - i := strings.IndexRune(url, '?') - if i != -1 { - url = url[:i] - } + url := req.URL.Path pathArray := strings.Split(url, "/") pathArray = removeBlankStrings(pathArray)