aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeskyblue <codeskyblue@gmail.com>2014-12-11 15:57:32 +0800
committercodeskyblue <codeskyblue@gmail.com>2014-12-11 15:57:32 +0800
commitdb6c0ebf762f2e06908622df9a7b3e8e4f782a57 (patch)
tree733a8ac54b2d72abcb2b071397d3d939bd67b7a5
parentcf7ebfbdc8d1e36c6ed0cf5a50810da056f8a559 (diff)
downloadgitea-db6c0ebf762f2e06908622df9a7b3e8e4f782a57.tar.gz
gitea-db6c0ebf762f2e06908622df9a7b3e8e4f782a57.zip
fix git clone error when repo has upper case name
-rw-r--r--routers/repo/http.go1
1 files changed, 1 insertions, 0 deletions
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)