aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/http.go
diff options
context:
space:
mode:
author赵智超 <1012112796@qq.com>2020-06-10 23:26:28 +0800
committerGitHub <noreply@github.com>2020-06-10 11:26:28 -0400
commitac2304f7a09fbd57adf2962746087d91f90e8692 (patch)
treebcef1f23b1df354855b62e338d7a0e69fa987bbd /routers/repo/http.go
parentdf231b725585e7284ed22a1a6050e17b78c14590 (diff)
downloadgitea-ac2304f7a09fbd57adf2962746087d91f90e8692.tar.gz
gitea-ac2304f7a09fbd57adf2962746087d91f90e8692.zip
fix a small nit (#11834)
As title, run this line in one time is enough. Signed-off-by: a1012112796 <1012112796@qq.com>
Diffstat (limited to 'routers/repo/http.go')
-rw-r--r--routers/repo/http.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go
index 1eec033882..0481b46bde 100644
--- a/routers/repo/http.go
+++ b/routers/repo/http.go
@@ -332,8 +332,9 @@ func HTTP(ctx *context.Context) {
Env: environ,
}
+ r.URL.Path = strings.ToLower(r.URL.Path) // blue: In case some repo name has upper case name
+
for _, route := range routes {
- r.URL.Path = strings.ToLower(r.URL.Path) // blue: In case some repo name has upper case name
if m := route.reg.FindStringSubmatch(r.URL.Path); m != nil {
if setting.Repository.DisableHTTPGit {
w.WriteHeader(http.StatusForbidden)