From: codeskyblue Date: Thu, 11 Dec 2014 07:57:32 +0000 (+0800) Subject: fix git clone error when repo has upper case name X-Git-Tag: v0.9.99~1587 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=db6c0ebf762f2e06908622df9a7b3e8e4f782a57;p=gitea.git fix git clone error when repo has upper case name --- diff --git a/routers/repo/http.go b/routers/repo/http.go index 2dc66449da..a5e01efc8f 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -227,6 +227,7 @@ var routes = []route{ func HttpBackend(config *Config) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { 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.cr.FindStringSubmatch(r.URL.Path); m != nil { if route.method != r.Method { renderMethodNotAllowed(w, r)