Theme 1 – New automatic body‑draining behavior and its trade‑offs
The change makes Response.Body.Close() read (up to ~50 ms) the remaining bytes so connections can be reused safely, but it also means you can no longer skip downloading the body by closing early.
- “It sucks that this changes the behaviour under the hood … but I do like the tradeoff here, since it also limits the download time to just 50 ms … you'll just wait a little bit of traffic instead.” – nasretdinov
- “I can attest to the fact this is a Frequently Asked Question among people who are trying to Go as an HTTP client… this feels somewhat icky, I can understand where it is coming from.” – jerf
Theme 2 – Need for clear documentation
Many participants noted that the semantics of Close() are not obvious and should be documented in the net/http package itself.
- “Am I missing something or is none of this information documented in net/http itself? This is a surprising implementation of 'Close' and should be documented somewhere.” – jerf
- “Note, however, that Transport will automatically try to read a Response Body to EOF asynchronously up to a conservative limit when a Body is closed.” – aleksi (link to https://pkg.go.dev/net/http#Client.Do)
- “I think it is reasonable for it to not be documented directly on Close … if you really wanted to slam the connection closed ASAP it does actually seem more logical to grab the underlying connection …” – jchw
Theme 3 – Interaction with HTTP/2, proxies, and internal service traffic
The behavior matters most for HTTP/1 (especially internal microservices); HTTP/2 already avoids the need for draining, and reverse‑proxy setups can see side‑effects if bodies aren’t consumed.
- “As explained in the post, you don’t need any of this in HTTP/2, since you get the benefits of connection sharing without having to read the drain connection body by protocol design.” – giovannibajo1
- “At the very end it mentions it won't drain bodies for Connection: close … Does this work with reverse proxies? I've had issues with nginx still getting IO errors …” – prussian
- “Although the article demonstrates the changes by making requests of a public web server, I would imagine this change has been primarily motivated by a desire to reduce overhead and latency on internal communication between microservices…” – MrDOS