1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-24 08:22:21 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-08-02 13:11:12 -07:00
parent 8fc833b4d5
commit 50fed083a7

View File

@ -284,7 +284,11 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
msg = err.Error()
}
if !c.Response().Committed() {
c.String(code, msg)
if c.Request().Method() == HEAD { // Issue #608
c.NoContent(code)
} else {
c.String(code, msg)
}
}
e.logger.Error(err)
}