beego:fix #639
Showing
1 changed file
with
0 additions
and
4 deletions
| ... | @@ -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 { | ... | ... |
-
Please register or sign in to post a comment