We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0daafa commit 79ea8a4Copy full SHA for 79ea8a4
req.go
@@ -178,10 +178,7 @@ func (r *DefaultReq) Body() []byte {
178
return []byte(err.Error())
179
}
180
181
- if r.c.app.config.Immutable {
182
- return utils.CopyBytes(body)
183
- }
184
- return body
+ return r.c.app.ImmutableBytes(body)
185
186
187
// RequestCtx returns *fasthttp.RequestCtx that carries a deadline
@@ -913,9 +910,5 @@ func (r *DefaultReq) release() {
913
910
914
911
915
912
func (r *DefaultReq) getBody() []byte {
916
917
- return utils.CopyBytes(r.c.fasthttp.Request.Body())
918
919
-
920
- return r.c.fasthttp.Request.Body()
+ return r.c.app.ImmutableBytes(r.c.fasthttp.Request.Body())
921
0 commit comments