]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: clarify when it's allowed to reuse a Request
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 9 Jul 2018 22:05:34 +0000 (22:05 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 10 Jul 2018 21:41:58 +0000 (21:41 +0000)
Fixes #21780

Change-Id: Ic6fb6a536fff800a05be2d25309f72092604a785
Reviewed-on: https://go-review.googlesource.com/122817
Reviewed-by: Andrew Bonventre <andybons@golang.org>
src/net/http/client.go

index 601017a6839428f973c4f270a44c50f6a03d84f4..da35557e3f9ebc5868f8ddc4f722414aed89451b 100644 (file)
@@ -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