From 00812ee8c1d4ac89b2610931eb9662899db1a14c Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 14 Apr 2014 16:50:03 -0700 Subject: [PATCH] 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 --- src/pkg/net/http/response.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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.