aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/export_test.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2016-09-09 18:06:56 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-09-09 22:55:40 +0000
commit6e87082d41f0267b39e6a1854d655b1d1c2f7541 (patch)
tree5d750c045d5d67a5dfeaeef36dd86983e3c64650 /src/net/http/export_test.go
parent1161a19c1ef536f8db2ca7eddf0e424e138e37db (diff)
downloadgo-6e87082d41f0267b39e6a1854d655b1d1c2f7541.tar.xz
net/http: make Client copy headers on redirect
Copy all of the original request's headers on redirect, unless they're sensitive. Only send sensitive ones to the same origin, or subdomains thereof. Fixes #4800 Change-Id: Ie9fa75265c9d5e4c1012c028d31fd1fd74465712 Reviewed-on: https://go-review.googlesource.com/28930 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Reviewed-by: Francesc Campoy Flores <campoy@golang.org> Reviewed-by: Ross Light <light@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/net/http/export_test.go')
-rw-r--r--src/net/http/export_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net/http/export_test.go b/src/net/http/export_test.go
index 9c5ba0809a..7fc3546caa 100644
--- a/src/net/http/export_test.go
+++ b/src/net/http/export_test.go
@@ -160,3 +160,5 @@ func ExportHttp2ConfigureTransport(t *Transport) error {
t.h2transport = t2
return nil
}
+
+var Export_shouldCopyHeaderOnRedirect = shouldCopyHeaderOnRedirect