1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-26 09:09:36 -05:00

fix git clone error when repo has upper case name

This commit is contained in:
codeskyblue 2014-12-11 15:57:32 +08:00
parent cf7ebfbdc8
commit db6c0ebf76

View 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)