diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-04-05 17:24:23 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-04-06 03:20:35 +0000 |
| commit | 870d997ab47fe88c33f4dadef38d7e85eeabf17c (patch) | |
| tree | 7cf599c388f32693f02d0bc2f2e5e46ad5b56a16 /src/net/http/client.go | |
| parent | fda831ed3f904c659fe41f253f75fe76528a28ee (diff) | |
| download | go-870d997ab47fe88c33f4dadef38d7e85eeabf17c.tar.xz | |
net/http: keep request context during Client redirects
Change-Id: I25c51280ba55120ffeaf08222f5ac5d471632d89
Reviewed-on: https://go-review.googlesource.com/21535
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/net/http/client.go')
| -rw-r--r-- | src/net/http/client.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net/http/client.go b/src/net/http/client.go index 10f5684a79..ee0fd2cb62 100644 --- a/src/net/http/client.go +++ b/src/net/http/client.go @@ -475,6 +475,7 @@ func (c *Client) doFollowingRedirects(req *Request, shouldRedirect func(int) boo URL: u, Header: make(Header), Cancel: ireq.Cancel, + ctx: ireq.ctx, } if ireq.Method == "POST" || ireq.Method == "PUT" { req.Method = "GET" |
