From 6937fee923873d01cc6017ae15ed7ec61dc1c1bc Mon Sep 17 00:00:00 2001 From: Pavel Burak Date: Sun, 20 Feb 2022 20:14:24 +0300 Subject: [PATCH] fix: (useless check), skip Response body if http method HEAD (#1224) --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index c6a292305f..82bc010de5 100644 --- a/server.go +++ b/server.go @@ -2335,7 +2335,7 @@ func (s *Server) serveConn(c net.Conn) (err error) { timeoutResponse.CopyTo(&ctx.Response) } - if !ctx.IsGet() && ctx.IsHead() { + if ctx.IsHead() { ctx.Response.SkipBody = true }