1
0
mirror of https://github.com/golang/go synced 2024-11-07 03:06:18 -07:00

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 <andybons@golang.org>
This commit is contained in:
Brad Fitzpatrick 2018-07-09 22:05:34 +00:00
parent d49572eaf3
commit 9776d025b3

View 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