diff options
| author | Tom Bergan <tombergan@google.com> | 2017-11-02 15:41:10 -0700 |
|---|---|---|
| committer | Tom Bergan <tombergan@google.com> | 2017-11-02 23:51:25 +0000 |
| commit | 3039bff9d07ce05dc9af8c155c6929ae5e53a231 (patch) | |
| tree | 1b8e146fe47e76653447ba47826ceaa67fcf330d /src/cmd/vendor/github.com/google | |
| parent | af37332d160e096fe5bedc551f318c7b76d4e57a (diff) | |
| download | go-3039bff9d07ce05dc9af8c155c6929ae5e53a231.tar.xz | |
net/http: clarify when it is safe to reuse a request
The godoc for RoundTrip already specifies when it's ok to reuse a
request that contains a body: the caller must wait until RoundTrip
calls Close on Request.Body.
This CL adds a small clarification: If the request does not have a
body, it can be reused as long as the caller does not mutate the
Request until RoundTrip fails or the Response.Body is closed.
Fixes #19653
Change-Id: I56652a9369978d11650e2e6314104831c2ce5e78
Reviewed-on: https://go-review.googlesource.com/75671
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/vendor/github.com/google')
0 files changed, 0 insertions, 0 deletions
