diff --git a/router.go b/router.go index dd665776..3a1dd2a8 100644 --- a/router.go +++ b/router.go @@ -158,7 +158,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) } if (requestPath[n-1] != '/' && route.pattern == requestPath) || - (len(route.pattern) >= n && requestPath[0:n-1] == route.pattern) { + (len(route.pattern) >= n-1 && requestPath[0:n-1] == route.pattern) { runrouter = route findrouter = true break