From 4d4096c7e440fa657e76c4203f75ef8a82fad4b8 Mon Sep 17 00:00:00 2001 From: astaxie Date: Wed, 19 Dec 2012 16:41:39 +0800 Subject: [PATCH] fix previer bug --- router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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