diff options
author | kinggo <lilong.21@bytedance.com> | 2023-01-14 10:44:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-14 10:44:11 +0800 |
commit | e87f84c51aad6a56cfebeff2d566de907bf73b7d (patch) | |
tree | 7f7dd943729d7772822d28ca97aff5b5849c9f13 /http.go | |
parent | chore: Update README.md (#1470) (diff) | |
download | fasthttp-e87f84c51aad6a56cfebeff2d566de907bf73b7d.tar.gz fasthttp-e87f84c51aad6a56cfebeff2d566de907bf73b7d.tar.bz2 fasthttp-e87f84c51aad6a56cfebeff2d566de907bf73b7d.zip |
fix: CopyTo doesn't copy bodyraw deeply (#1471)
Diffstat (limited to 'http.go')
-rw-r--r-- | http.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -771,7 +771,7 @@ func (req *Request) ResetBody() { func (req *Request) CopyTo(dst *Request) { req.copyToSkipBody(dst) if req.bodyRaw != nil { - dst.bodyRaw = req.bodyRaw + dst.bodyRaw = append(dst.bodyRaw, req.bodyRaw...) if dst.body != nil { dst.body.Reset() } @@ -803,7 +803,7 @@ func (req *Request) copyToSkipBody(dst *Request) { func (resp *Response) CopyTo(dst *Response) { resp.copyToSkipBody(dst) if resp.bodyRaw != nil { - dst.bodyRaw = resp.bodyRaw + dst.bodyRaw = append(dst.bodyRaw, resp.bodyRaw...) if dst.body != nil { dst.body.Reset() } |