1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-26 04:01:29 +00:00
This commit is contained in:
astaxie 2013-12-28 23:06:20 +08:00
parent 7a3d05ebf3
commit 95dc670eb4

View File

@ -580,7 +580,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
http.Redirect(w, r, requestPath+"/", 301) http.Redirect(w, r, requestPath+"/", 301)
goto Admin goto Admin
} }
if n >= 1 && requestPath[:n-1] == route.pattern { if requestPath[n-1] == '/' && n >= 2 && requestPath[:n-2] == route.pattern {
runMethod = p.getRunMethod(r.Method, context, route) runMethod = p.getRunMethod(r.Method, context, route)
if runMethod != "" { if runMethod != "" {
runrouter = route.controllerType runrouter = route.controllerType