Compare commits

...

2 Commits

Author SHA1 Message Date
mehrdadbn9
cfc8f2389c
Merge 96c3ad35b87049ec419a35b6bfb8b9f9cfe225d3 into d7776de7d444935ea4385999711bd6331a98fecb 2026-02-05 23:49:35 +03:30
mehrdadbn9
96c3ad35b8 Use http.StatusContinue constant instead of magic number 100
Replace magic number `100` with `http.StatusContinue` constant for better code clarity and maintainability in `bodyAllowedForStatus` function.

Fixes #4489
2026-02-05 23:43:48 +03:30

View File

@ -1058,7 +1058,7 @@ 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:
case status >= http.StatusContinue && status <= 199:
return false
case status == http.StatusNoContent:
return false