diff options
author | Unknwon <u@gogs.io> | 2016-12-22 01:51:49 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-12-22 01:51:49 -0500 |
commit | 16d3e7085efc1143cdae026fda4fe86d15f615dd (patch) | |
tree | e43e98d63f5d76f19d22476220b11e7e423ec904 /routers/repo/http.go | |
parent | c47fbc629bec5b4c213ddff24e96c20ed8f4ca74 (diff) |
Minor fix for PR #3667
Diffstat (limited to 'routers/repo/http.go')
-rw-r--r-- | routers/repo/http.go | 1 |
1 files changed, 1 insertions, 0 deletions
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) |