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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions http-client/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for http-client

## Unreleased

* Fix a space leak when storing original requests inside responses [#540](https://github.com/snoyberg/http-client/pull/540)

## 0.7.17

* Add `managerSetMaxHeaderLength` to `Client` to change `ManagerSettings` `MaxHeaderLength`.
Expand Down
2 changes: 1 addition & 1 deletion http-client/Network/HTTP/Client/Response.hs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ getResponse mhl timeout' req@(Request {..}) mconn cont = do
then makeGzipReader body1
else return body1

return Response
return $! Response
{ responseStatus = s
, responseVersion = version
, responseHeaders = hs
Expand Down
4 changes: 2 additions & 2 deletions http-client/Network/HTTP/Client/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ data Request = Request
-- are honoured.
--
-- Since 0.1.0
, requestBody :: RequestBody
, requestBody :: !RequestBody
-- ^ Request body to be sent to the server.
--
-- Since 0.1.0
Expand Down Expand Up @@ -714,7 +714,7 @@ data Response body = Response
-- be impossible.
--
-- Since 0.1.0
, responseOriginalRequest :: Request
, responseOriginalRequest :: !Request
-- ^ Holds original @Request@ related to this @Response@ (with an empty body).
-- This field is intentionally not exported directly, but made available
-- via @getOriginalRequest@ instead.
Expand Down