Skip to content

Commit

Permalink
Fix redirect with non-ascii branch names (go-gitea#4764)
Browse files Browse the repository at this point in the history
  • Loading branch information
SagePtr committed Aug 30, 2018
1 parent b9ae16d commit 42235cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/context/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ func RepoRefByType(refType RepoRefType) macaron.Handler {
// redirect from old URL scheme to new URL scheme
ctx.Redirect(path.Join(
setting.AppSubURL,
strings.TrimSuffix(ctx.Req.URL.String(), ctx.Params("*")),
strings.TrimSuffix(ctx.Req.URL.Path, ctx.Params("*")),
ctx.Repo.BranchNameSubURL(),
ctx.Repo.TreePath))
return
Expand Down

0 comments on commit 42235cc

Please sign in to comment.