diff --git a/router.go b/router.go index a6e4e5b..d8974ae 100755 --- a/router.go +++ b/router.go @@ -113,7 +113,7 @@ func (router *Router) validateRoute(path string) error { func (router *Router) ServeHTTP(response http.ResponseWriter, request *http.Request) { // check for exact matching - route, _, parameter := router.findRoute(request.Method, request.RequestURI, false) + route, _, parameter := router.findRoute(request.Method, request.URL.Path, false) if route != nil && route.handler != nil { route.handler.ServeHTTP(response, request, RoutingInfo{Parameters: parameter}) return diff --git a/router_test.go b/router_test.go index c085142..4df1715 100755 --- a/router_test.go +++ b/router_test.go @@ -90,7 +90,7 @@ func TestRouterServerHandler(t *testing.T) { go http.Serve(listener, router) // call method - _, err = http.Get("http://localhost:8081/") + _, err = http.Get("http://localhost:8081/?test=false") if err != nil { t.Error(err) }