Add comment for bodyAllowedForStatus to clarify 1xx response handling

This commit is contained in:
anfaas1618 2026-01-03 23:55:29 +05:30
parent 762433d85e
commit 68ae08b048

View File

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