mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-17 22:32:26 +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 {
|
||||
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)
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user