Skip to content

Commit ac2304f

Browse files
authored
fix a small nit (go-gitea#11834)
As title, run this line in one time is enough. Signed-off-by: a1012112796 <[email protected]>
1 parent df231b7 commit ac2304f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

routers/repo/http.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,9 @@ func HTTP(ctx *context.Context) {
332332
Env: environ,
333333
}
334334

335+
r.URL.Path = strings.ToLower(r.URL.Path) // blue: In case some repo name has upper case name
336+
335337
for _, route := range routes {
336-
r.URL.Path = strings.ToLower(r.URL.Path) // blue: In case some repo name has upper case name
337338
if m := route.reg.FindStringSubmatch(r.URL.Path); m != nil {
338339
if setting.Repository.DisableHTTPGit {
339340
w.WriteHeader(http.StatusForbidden)

0 commit comments

Comments
 (0)