diff options
author | SagePtr <sageptr@gmail.com> | 2018-09-07 03:37:02 +0200 |
---|---|---|
committer | techknowlogick <techknowlogick@users.noreply.github.com> | 2018-09-06 21:37:02 -0400 |
commit | bf552761894dee08f734d91f5c8175cd0cb2f9f5 (patch) | |
tree | 9287c1142d40ce49e1d407e25ebce08d2a9252a7 /modules | |
parent | 13e8a0fe56cfe13a900df07fffeb246077cfaa96 (diff) | |
download | gitea-bf552761894dee08f734d91f5c8175cd0cb2f9f5.tar.gz gitea-bf552761894dee08f734d91f5c8175cd0cb2f9f5.zip |
Fix redirect with non-ascii branch names (#4764) (#4810)
* Fix redirect with non-ascii branch names (#4764)
* Add integration tests for non-ascii branch redirect
* Fix mysql test and coverage test
Diffstat (limited to 'modules')
-rw-r--r-- | modules/context/repo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 17a319ecc0..7221ad7c8a 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -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 |