Merge 68ae08b048e21eb28e516e1d50d33dfa2f06d258 into 3ab698dc5110af1977d57226e4995c57dd34c233

This commit is contained in:
anfaas1618 2026-01-17 17:13:54 +08:00 committed by GitHub
commit ebd2f30078
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1034,7 +1034,8 @@ func (c *Context) requestHeader(key string) string {
// bodyAllowedForStatus is a copy of http.bodyAllowedForStatus non-exported function.
func bodyAllowedForStatus(status int) bool {
switch {
case status >= 100 && status <= 199:
// body isn't allowed for 1xx informational responses
case status >= http.StatusContinue && status <= 199:
return false
case status == http.StatusNoContent:
return false