mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-18 23:12:17 +08:00
resolve
This commit is contained in:
parent
ca062b76d1
commit
9af3803ed9
2
gin.go
2
gin.go
@ -448,7 +448,7 @@ func (engine *Engine) handleHTTPRequest(c *Context) {
|
|||||||
}
|
}
|
||||||
if len(allowed) > 0 {
|
if len(allowed) > 0 {
|
||||||
c.handlers = engine.allNoMethod
|
c.handlers = engine.allNoMethod
|
||||||
c.writermem.Header()["Allow"] = []string{strings.Join(allowed, ", ")}
|
c.writermem.Header().Set("Allow", strings.Join(allowed, ", "))
|
||||||
serveError(c, http.StatusMethodNotAllowed, default405Body)
|
serveError(c, http.StatusMethodNotAllowed, default405Body)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user