1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-22 00:13:12 +00:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Fenny 2020-09-22 12:32:43 +02:00
commit ec5d20b1dc

View File

@ -129,9 +129,7 @@ func (app *App) next(c *Ctx) (match bool, err error) {
// If no match, scan stack again if other methods match the request
// Moved from app.handler because middleware may break the route chain
if !c.matched && methodExist(c) {
if catch := c.app.config.ErrorHandler(c, ErrMethodNotAllowed); catch != nil {
_ = c.SendStatus(StatusInternalServerError)
}
err = ErrMethodNotAllowed
}
return
}