mirror of
https://github.com/labstack/echo.git
synced 2025-04-21 12:17:04 +02:00
parent
8fc833b4d5
commit
50fed083a7
4
echo.go
4
echo.go
@ -284,8 +284,12 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
|
|||||||
msg = err.Error()
|
msg = err.Error()
|
||||||
}
|
}
|
||||||
if !c.Response().Committed() {
|
if !c.Response().Committed() {
|
||||||
|
if c.Request().Method() == HEAD { // Issue #608
|
||||||
|
c.NoContent(code)
|
||||||
|
} else {
|
||||||
c.String(code, msg)
|
c.String(code, msg)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
e.logger.Error(err)
|
e.logger.Error(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user