From: Brad Fitzpatrick Date: Mon, 9 Jul 2018 22:05:34 +0000 (+0000) Subject: net/http: clarify when it's allowed to reuse a Request X-Git-Tag: go1.11beta2~153 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9776d025b3375f35920707757d9f5a450195c69f;p=gostls13.git net/http: clarify when it's allowed to reuse a Request Fixes #21780 Change-Id: Ic6fb6a536fff800a05be2d25309f72092604a785 Reviewed-on: https://go-review.googlesource.com/122817 Reviewed-by: Andrew Bonventre --- diff --git a/src/net/http/client.go b/src/net/http/client.go index 601017a683..da35557e3f 100644 --- a/src/net/http/client.go +++ b/src/net/http/client.go @@ -129,8 +129,8 @@ type RoundTripper interface { // RoundTrip should not modify the request, except for // consuming and closing the Request's Body. RoundTrip may // read fields of the request in a separate goroutine. Callers - // should not mutate the request until the Response's Body has - // been closed. + // should not mutate or reuse the request until the Response's + // Body has been closed. // // RoundTrip must always close the body, including on errors, // but depending on the implementation may do so in a separate