8a37c30f by astaxie

fix #226

1 parent c4edc134
...@@ -382,7 +382,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -382,7 +382,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
382 // pattern /admin url /admin 200 /admin/ 404 382 // pattern /admin url /admin 200 /admin/ 404
383 // pattern /admin/ url /admin 301 /admin/ 200 383 // pattern /admin/ url /admin 301 /admin/ 200
384 if requestPath[n-1] != '/' && len(route.pattern) == n+1 && 384 if requestPath[n-1] != '/' && len(route.pattern) == n+1 &&
385 route.pattern[n] == '/' && route.pattern[:n-1] == requestPath { 385 route.pattern[n] == '/' && route.pattern[:n] == requestPath {
386 http.Redirect(w, r, requestPath+"/", 301) 386 http.Redirect(w, r, requestPath+"/", 301)
387 return 387 return
388 } 388 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!