Skip to content

Commit

Permalink
fix: (useless check), skip Response body if http method HEAD (#1224)
Browse files Browse the repository at this point in the history
  • Loading branch information
sten4eg committed Feb 20, 2022
1 parent b85d2a2 commit 6937fee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.go
Expand Up @@ -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
}

Expand Down

0 comments on commit 6937fee

Please sign in to comment.