From db6c0ebf762f2e06908622df9a7b3e8e4f782a57 Mon Sep 17 00:00:00 2001 From: codeskyblue Date: Thu, 11 Dec 2014 15:57:32 +0800 Subject: [PATCH] fix git clone error when repo has upper case name --- routers/repo/http.go | 1 + 1 file changed, 1 insertion(+) 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)