]> source.dussan.org Git - gitea.git/commitdiff
fix git clone error when repo has upper case name
authorcodeskyblue <codeskyblue@gmail.com>
Thu, 11 Dec 2014 07:57:32 +0000 (15:57 +0800)
committercodeskyblue <codeskyblue@gmail.com>
Thu, 11 Dec 2014 07:57:32 +0000 (15:57 +0800)
routers/repo/http.go

index 2dc66449da9b9f78f7eb01799ba2168e7c8fa2cd..a5e01efc8f6b9f2d195f09e3a6b90d7b254df22b 100644 (file)
@@ -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)