From: Brad Fitzpatrick Date: Mon, 14 Apr 2014 23:50:03 +0000 (-0700) Subject: net/http: clarify Response.Body Close responsibility X-Git-Tag: go1.3beta1~85 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=00812ee8c1d4ac89b2610931eb9662899db1a14c;p=gostls13.git net/http: clarify Response.Body Close responsibility Per TODO email in my inbox. LGTM=rsc R=golang-codereviews, rsc CC=adg, dsymonds, golang-codereviews, r https://golang.org/cl/87550045 --- diff --git a/src/pkg/net/http/response.go b/src/pkg/net/http/response.go index 197664ceb7..5949191270 100644 --- a/src/pkg/net/http/response.go +++ b/src/pkg/net/http/response.go @@ -47,7 +47,8 @@ type Response struct { // // The http Client and Transport guarantee that Body is always // non-nil, even on responses without a body or responses with - // a zero-lengthed body. + // a zero-length body. It is the caller's responsibility to + // close Body. // // The Body is automatically dechunked if the server replied // with a "chunked" Transfer-Encoding.