1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 19:10:54 +00:00

fix previer bug

This commit is contained in:
astaxie 2012-12-19 16:41:39 +08:00
parent 3f076f4ca0
commit 4d4096c7e4

View File

@ -158,7 +158,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
} }
if (requestPath[n-1] != '/' && route.pattern == requestPath) || 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 runrouter = route
findrouter = true findrouter = true
break break