From 16d3e7085efc1143cdae026fda4fe86d15f615dd Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 22 Dec 2016 01:51:49 -0500 Subject: Minor fix for PR #3667 --- routers/repo/http.go | 1 + 1 file changed, 1 insertion(+) (limited to 'routers/repo/http.go') diff --git a/routers/repo/http.go b/routers/repo/http.go index 65a5d5fa..31d8ab13 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -484,6 +484,7 @@ func HTTPBackend(ctx *context.Context, cfg *serviceConfig) http.HandlerFunc { w.Write([]byte("Interacting with repositories by HTTP protocol is not allowed")) return } + if route.method != r.Method { if r.Proto == "HTTP/1.1" { w.WriteHeader(http.StatusMethodNotAllowed) -- cgit v1.2.3