]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: clarify Response.Body Close responsibility
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 14 Apr 2014 23:50:03 +0000 (16:50 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 14 Apr 2014 23:50:03 +0000 (16:50 -0700)
Per TODO email in my inbox.

LGTM=rsc
R=golang-codereviews, rsc
CC=adg, dsymonds, golang-codereviews, r
https://golang.org/cl/87550045

src/pkg/net/http/response.go

index 197664ceb75ad8dcbaca9d0e7bc33280ad07e650..59491912704bbc24d496362ccb519623ae98256d 100644 (file)
@@ -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.