Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Conversation

@domenicrosati
Copy link

Using this library, we noticed a memory leak.
We traced it too these response bodies not being able to be closed (becuase they are never passed back)

@mikegleasonjr
Copy link

Friendly ping, can we get a merge on this one 📦

for _, header := range endToEndHeaders {
cachedResp.Header[header] = resp.Header[header]
}
resp.Body.Close()
Copy link

@CAFxX CAFxX Feb 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be ideal to do

io.Copy(io.Discard, resp.Body)
resp.Body.Close()

so that the HTTP connection can also be reused

(same below)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants