1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-15 01:34:53 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2017-09-08 08:48:23 -07:00
parent f2bc6802be
commit 1678da53d6

View File

@ -332,6 +332,9 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
msg = Map{"message": msg}
}
e.Logger.Error(err)
// Send response
if !c.Response().Committed {
if c.Request().Method == HEAD { // Issue #608
err = c.NoContent(code)
@ -342,8 +345,6 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
e.Logger.Error(err)
}
}
e.Logger.Error(err)
}
// Pre adds middleware to the chain which is run before router.