95dc670e by astaxie

fix #416

1 parent 7a3d05eb
...@@ -580,7 +580,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -580,7 +580,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
580 http.Redirect(w, r, requestPath+"/", 301) 580 http.Redirect(w, r, requestPath+"/", 301)
581 goto Admin 581 goto Admin
582 } 582 }
583 if n >= 1 && requestPath[:n-1] == route.pattern { 583 if requestPath[n-1] == '/' && n >= 2 && requestPath[:n-2] == route.pattern {
584 runMethod = p.getRunMethod(r.Method, context, route) 584 runMethod = p.getRunMethod(r.Method, context, route)
585 if runMethod != "" { 585 if runMethod != "" {
586 runrouter = route.controllerType 586 runrouter = route.controllerType
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!