From 5ce009a2dc9ea86d4d655089ad2f82ba3827fb1f Mon Sep 17 00:00:00 2001 From: astaxie Date: Wed, 19 Dec 2012 11:26:10 +0800 Subject: [PATCH] fix bug --- router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router.go b/router.go index 4bb07273..82d71dc0 100644 --- a/router.go +++ b/router.go @@ -147,7 +147,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) for _, route := range p.fixrouters { n := len(requestPath) if (requestPath[n-1] != '/' && route.pattern == requestPath) || - (len(route.pattern) >= n && requestPath[0:n-1] == route.pattern) { + (len(route.pattern) >= n && requestPath == route.pattern) { runrouter = route findrouter = true break