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
This commit is contained in:
mehrdadbn9 2026-02-06 15:07:02 +03:30
parent 7534258241
commit 0b5ba70810

View File

@ -1056,6 +1056,8 @@ func (c *Context) requestHeader(key string) string {
/************************************/
// bodyAllowedForStatus is a copy of http.bodyAllowedForStatus non-exported function.
// Use http.StatusContinue constant for better code clarity
func bodyAllowedForStatus(status int) bool {
switch {
case status >= http.StatusContinue && status <= 199: