From e8e9b15d241c6ba75ed3e321380d9a33c487bf59 Mon Sep 17 00:00:00 2001 From: akkuman Date: Thu, 4 Dec 2025 10:34:21 +0800 Subject: [PATCH] fix: use Body() instead of BodyRaw() in fiber to auto decompress the req body BodyRaw() does not automatically recognize the value in Content-Encoding to decompress the request body, and returns unexpected values in the case of request compression --- adapters/humafiber/humafiber.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/humafiber/humafiber.go b/adapters/humafiber/humafiber.go index ba972d9a..e37f648b 100644 --- a/adapters/humafiber/humafiber.go +++ b/adapters/humafiber/humafiber.go @@ -106,7 +106,7 @@ func (c *fiberWrapper) BodyReader() io.Reader { // Streaming is enabled, so send the reader. return orig.Request().BodyStream() } - return bytes.NewReader(orig.BodyRaw()) + return bytes.NewReader(orig.Body()) } func (c *fiberWrapper) GetMultipartForm() (*multipart.Form, error) {