fix a small nit (#11834)

As title, run this line in one time is enough.

Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
赵智超 2020-06-10 23:26:28 +08:00 committed by GitHub
parent df231b7255
commit ac2304f7a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -332,8 +332,9 @@ func HTTP(ctx *context.Context) {
Env: environ, Env: environ,
} }
for _, route := range routes {
r.URL.Path = strings.ToLower(r.URL.Path) // blue: In case some repo name has upper case name r.URL.Path = strings.ToLower(r.URL.Path) // blue: In case some repo name has upper case name
for _, route := range routes {
if m := route.reg.FindStringSubmatch(r.URL.Path); m != nil { if m := route.reg.FindStringSubmatch(r.URL.Path); m != nil {
if setting.Repository.DisableHTTPGit { if setting.Repository.DisableHTTPGit {
w.WriteHeader(http.StatusForbidden) w.WriteHeader(http.StatusForbidden)