diff options
Diffstat (limited to 'modules/public/public.go')
-rw-r--r-- | modules/public/public.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/public/public.go b/modules/public/public.go index f03f8fcc15..2e004536f8 100644 --- a/modules/public/public.go +++ b/modules/public/public.go @@ -117,7 +117,7 @@ func (opts *Options) handle(ctx *macaron.Context, log *log.Logger, opt *Options) if fi.IsDir() { // Redirect if missing trailing slash. if !strings.HasSuffix(ctx.Req.URL.Path, "/") { - http.Redirect(ctx.Resp, ctx.Req.Request, ctx.Req.URL.Path+"/", http.StatusFound) + http.Redirect(ctx.Resp, ctx.Req.Request, path.Clean(ctx.Req.URL.Path+"/"), http.StatusFound) return true } |