aa275fb5 by astaxie

beego:fix #639

1 parent deb553be
...@@ -35,10 +35,6 @@ func serverStaticRouter(ctx *context.Context) { ...@@ -35,10 +35,6 @@ func serverStaticRouter(ctx *context.Context) {
35 if len(requestPath) > len(prefix) && requestPath[len(prefix)] != '/' { 35 if len(requestPath) > len(prefix) && requestPath[len(prefix)] != '/' {
36 continue 36 continue
37 } 37 }
38 if requestPath == prefix && prefix[len(prefix)-1] != '/' {
39 http.Redirect(ctx.ResponseWriter, ctx.Request, requestPath+"/", 302)
40 return
41 }
42 file := path.Join(staticDir, requestPath[len(prefix):]) 38 file := path.Join(staticDir, requestPath[len(prefix):])
43 finfo, err := os.Stat(file) 39 finfo, err := os.Stat(file)
44 if err != nil { 40 if err != nil {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!