]> Cypherpunks repositories - gostls13.git/commit
net/http: deep copy Request.URL also in Request.WithContext's copy
authorEmmanuel Odeke <emm.odeke@gmail.com>
Fri, 21 Apr 2017 17:49:19 +0000 (11:49 -0600)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 24 May 2017 04:34:52 +0000 (04:34 +0000)
commit3b69c3bbed7f49eb2f69729c8edbe8fe2b6cc40a
tree8c6cd481469ffa98cdb67dff08e910dae9c3abee
parent88a235042df2d8344bb4f49a8bfc1642b2cbf37b
net/http: deep copy Request.URL also in Request.WithContext's copy

Despite the previously known behavior of Request.WithContext
shallow copying a request, usage of the request inside server.ServeHTTP
mutates the request's URL. This CL implements deep copying of the URL.

Fixes #20068

Change-Id: I86857d7259e23ac624d196401bf12dde401c42af
Reviewed-on: https://go-review.googlesource.com/41308
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/httputil/reverseproxy_test.go
src/net/http/request.go
src/net/http/request_test.go