1
0
mirror of https://github.com/golang/go synced 2024-11-19 20:54:39 -07:00

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
This commit is contained in:
Brad Fitzpatrick 2014-04-14 16:50:03 -07:00
parent 632e641fd2
commit 00812ee8c1

View 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.