From 762433d85e1bbcc4b32554785ad67f2b2f2f21fa Mon Sep 17 00:00:00 2001 From: anfaas1618 Date: Sat, 3 Jan 2026 23:48:28 +0530 Subject: [PATCH 1/2] Use `http.StatusContinue` constant for clarity in status code comparison --- context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context.go b/context.go index c42459ff..e4a10834 100644 --- a/context.go +++ b/context.go @@ -1034,7 +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 { - case status >= 100 && status <= 199: + case status >= http.StatusContinue && status <= 199: return false case status == http.StatusNoContent: return false From 68ae08b048e21eb28e516e1d50d33dfa2f06d258 Mon Sep 17 00:00:00 2001 From: anfaas1618 Date: Sat, 3 Jan 2026 23:55:29 +0530 Subject: [PATCH 2/2] Add comment for bodyAllowedForStatus to clarify 1xx response handling --- context.go | 1 + 1 file changed, 1 insertion(+) diff --git a/context.go b/context.go index e4a10834..2135c72d 100644 --- a/context.go +++ b/context.go @@ -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: