From 0b5ba708107abca1a4aedc046fdc3aadff77fd79 Mon Sep 17 00:00:00 2001 From: mehrdadbn9 Date: Fri, 6 Feb 2026 15:07:02 +0330 Subject: [PATCH] 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 --- context.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/context.go b/context.go index 65affc7f..2f108002 100644 --- a/context.go +++ b/context.go @@ -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: