This commit is contained in:
gospider
2024-01-04 11:47:39 +08:00
parent d225f8f8e7
commit a6067ae93e
4 changed files with 53 additions and 36 deletions

View File

@@ -281,13 +281,8 @@ func (obj *Response) ReadBody() (err error) {
bar: bar.NewClient(obj.response.ContentLength),
body: bBody,
}, obj.response.Body)
// err = tools.CopyWitchContext(obj.response.Request.Context(), &barBody{
// bar: bar.NewClient(obj.response.ContentLength),
// body: bBody,
// }, obj.response.Body)
} else {
_, err = io.Copy(bBody, obj.response.Body)
// err = tools.CopyWitchContext(obj.ctx, bBody, obj.response.Body)
}
if err != nil {
obj.ForceCloseConn()