Commit 8476d4cf authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: document Response.Body Read+Close interaction with keep-alive

Fixes #5645

Change-Id: Ifb46d6faf7ac838792920f6fe00912947478e761
Reviewed-on: https://go-review.googlesource.com/1531Reviewed-by: 's avatarDavid Symonds <dsymonds@golang.org>
parent 0e4ee0c9
...@@ -48,7 +48,10 @@ type Response struct { ...@@ -48,7 +48,10 @@ type Response struct {
// The http Client and Transport guarantee that Body is always // The http Client and Transport guarantee that Body is always
// non-nil, even on responses without a body or responses with // non-nil, even on responses without a body or responses with
// a zero-length body. It is the caller's responsibility to // a zero-length body. It is the caller's responsibility to
// close Body. // close Body. The default HTTP client's Transport does not
// attempt to reuse HTTP/1.0 or HTTP/1.1 TCP connections
// ("keep-alive") unless the Body is read to completion and is
// closed.
// //
// The Body is automatically dechunked if the server replied // The Body is automatically dechunked if the server replied
// with a "chunked" Transfer-Encoding. // with a "chunked" Transfer-Encoding.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment