Skip to content

Commit 50fed08

Browse files
committed
Fixed #608
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent 8fc833b commit 50fed08

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

echo.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,11 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
284284
msg = err.Error()
285285
}
286286
if !c.Response().Committed() {
287-
c.String(code, msg)
287+
if c.Request().Method() == HEAD { // Issue #608
288+
c.NoContent(code)
289+
} else {
290+
c.String(code, msg)
291+
}
288292
}
289293
e.logger.Error(err)
290294
}

0 commit comments

Comments
 (0)