This commit is contained in:
youngblood 2018-08-15 14:44:17 +08:00
parent 31b6862acb
commit 70537925b4

2
gin.go
View File

@ -380,7 +380,7 @@ func (engine *Engine) handleHTTPRequest(c *Context) {
if tree.method == httpMethod {
continue
}
if handlers, _, _ := tree.root.getValue(path, nil, unescape); handlers != nil {
if handlers, _, _, _ := tree.root.getValue(path, nil, unescape); handlers != nil {
c.handlers = engine.allNoMethod
serveError(c, http.StatusMethodNotAllowed, default405Body)
return