Skip to content

Commit 42235cc

Browse files
committed
Fix redirect with non-ascii branch names (#4764)
1 parent b9ae16d commit 42235cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/context/repo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ func RepoRefByType(refType RepoRefType) macaron.Handler {
625625
// redirect from old URL scheme to new URL scheme
626626
ctx.Redirect(path.Join(
627627
setting.AppSubURL,
628-
strings.TrimSuffix(ctx.Req.URL.String(), ctx.Params("*")),
628+
strings.TrimSuffix(ctx.Req.URL.Path, ctx.Params("*")),
629629
ctx.Repo.BranchNameSubURL(),
630630
ctx.Repo.TreePath))
631631
return

0 commit comments

Comments
 (0)