From ac2304f7a09fbd57adf2962746087d91f90e8692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=99=BA=E8=B6=85?= <1012112796@qq.com> Date: Wed, 10 Jun 2020 23:26:28 +0800 Subject: [PATCH] fix a small nit (#11834) As title, run this line in one time is enough. Signed-off-by: a1012112796 <1012112796@qq.com> --- routers/repo/http.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routers/repo/http.go b/routers/repo/http.go index 1eec03388..0481b46bd 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)