aboutsummaryrefslogtreecommitdiff
path: root/routers/repo
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-12-22 01:51:49 -0500
committerUnknwon <u@gogs.io>2016-12-22 01:51:49 -0500
commit16d3e7085efc1143cdae026fda4fe86d15f615dd (patch)
treee43e98d63f5d76f19d22476220b11e7e423ec904 /routers/repo
parentc47fbc629bec5b4c213ddff24e96c20ed8f4ca74 (diff)
Minor fix for PR #3667
Diffstat (limited to 'routers/repo')
-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 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)