]> Cypherpunks repositories - gostls13.git/commit
net/http: make Transport.RoundTrip preserve Requests
authorDamien Neil <dneil@google.com>
Thu, 11 Jun 2020 20:30:23 +0000 (13:30 -0700)
committerAndrew Bonventre <andybons@golang.org>
Wed, 17 Jun 2020 19:48:45 +0000 (19:48 +0000)
commit8b98498a5833111402a2fe8f13a6605e071994b6
treeac57a9815197a6e5777df35f53a969356e3b7c60
parentf84bbd52b0021c401b0b6508e90e913ae0aa241d
net/http: make Transport.RoundTrip preserve Requests

Ensure that the exact Request passed to Transport.RoundTrip
is returned in the Response. Do not replace the Request with
a copy when resetting the request body.

Fixes #39533

Change-Id: Ie6fb080c24b0f6625b0761b7aa542af3d2411817
Reviewed-on: https://go-review.googlesource.com/c/go/+/237560
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/net/http/transport.go
src/net/http/transport_test.go