Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force response body update #540

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JackKelly-Bellroy
Copy link
Contributor

Fixes #538

Draft for now, but keen for comments: do you prefer strict lets? seq? Bang patterns?

We will test this internally before recommending that it gets merged.

`Network.HTTP.Client.Response.getResponse` stores the original request
inside a `Response`, but attempts to override its request body with an
empty one. This record update was lazy, and a reference to the
original request body would persist, causing a space leak.

Force the response to WHNF, and use bang patterns to force the Request
and ultimately its body to WHNF too.
@snoyberg
Copy link
Owner

snoyberg commented Jul 7, 2024

Either approach is fine with me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

http-conduit: Requests may be retained in Responses
3 participants