1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 13:40:55 +00:00
This commit is contained in:
astaxie 2012-12-19 11:26:10 +08:00
parent 8a99591298
commit 5ce009a2dc

View File

@ -147,7 +147,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
for _, route := range p.fixrouters { for _, route := range p.fixrouters {
n := len(requestPath) n := len(requestPath)
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 && requestPath == route.pattern) {
runrouter = route runrouter = route
findrouter = true findrouter = true
break break