mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 13:28:25 +00:00 
			
		
		
		
	fix git clone error when repo has upper case name
This commit is contained in:
		@@ -227,6 +227,7 @@ var routes = []route{
 | 
				
			|||||||
func HttpBackend(config *Config) http.HandlerFunc {
 | 
					func HttpBackend(config *Config) http.HandlerFunc {
 | 
				
			||||||
	return func(w http.ResponseWriter, r *http.Request) {
 | 
						return func(w http.ResponseWriter, r *http.Request) {
 | 
				
			||||||
		for _, route := range routes {
 | 
							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 m := route.cr.FindStringSubmatch(r.URL.Path); m != nil {
 | 
				
			||||||
				if route.method != r.Method {
 | 
									if route.method != r.Method {
 | 
				
			||||||
					renderMethodNotAllowed(w, r)
 | 
										renderMethodNotAllowed(w, r)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user