Skip to content- Sources: primary, discussion
- Summary: Starting in Go 1.27, net/http.Transport drains unread HTTP/1 response bodies asynchronously, for up to 50 ms or 256 KB, and skips draining when the response says Connection: close. In the Go team's example, 100 requests that only read the status code took about 150 ms instead of about 710 ms on Go 1.26. The team now recommends just closing response bodies rather than draining them by hand.
- Why it matters: Go services that close bodies without reading them stop paying new TCP and TLS handshakes over HTTP/1, and manual drain helpers become unnecessary.