Commit 9776d025 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: clarify when it's allowed to reuse a Request

Fixes #21780

Change-Id: Ic6fb6a536fff800a05be2d25309f72092604a785
Reviewed-on: https://go-review.googlesource.com/122817Reviewed-by: default avatarAndrew Bonventre <andybons@golang.org>
parent d49572ea
...@@ -129,8 +129,8 @@ type RoundTripper interface { ...@@ -129,8 +129,8 @@ type RoundTripper interface {
// RoundTrip should not modify the request, except for // RoundTrip should not modify the request, except for
// consuming and closing the Request's Body. RoundTrip may // consuming and closing the Request's Body. RoundTrip may
// read fields of the request in a separate goroutine. Callers // read fields of the request in a separate goroutine. Callers
// should not mutate the request until the Response's Body has // should not mutate or reuse the request until the Response's
// been closed. // Body has been closed.
// //
// RoundTrip must always close the body, including on errors, // RoundTrip must always close the body, including on errors,
// but depending on the implementation may do so in a separate // but depending on the implementation may do so in a separate
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment