mirror of
https://github.com/astaxie/beego.git
synced 2024-11-01 03:40:55 +00:00
fix #416
This commit is contained in:
parent
7a3d05ebf3
commit
95dc670eb4
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user