diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-05-18 15:42:54 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-05-18 18:01:50 +0000 |
| commit | 8f13080267d0ddbb50da9029339796841224116a (patch) | |
| tree | 6fda6484226584bde777be21e2b1abf264564978 /src/net/http/request.go | |
| parent | 5d92aefc18317578226a3873fb8fc37411cd2184 (diff) | |
| download | go-8f13080267d0ddbb50da9029339796841224116a.tar.xz | |
net/http: allow Client.CheckRedirect to use most recent response
Fixes #10069
Change-Id: I3819ff597d5a0c8e785403bf9d65a054f50655a6
Reviewed-on: https://go-review.googlesource.com/23207
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/net/http/request.go')
| -rw-r--r-- | src/net/http/request.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net/http/request.go b/src/net/http/request.go index 45507d23d1..e8780dea94 100644 --- a/src/net/http/request.go +++ b/src/net/http/request.go @@ -255,6 +255,11 @@ type Request struct { // set, it is undefined whether Cancel is respected. Cancel <-chan struct{} + // Response is the redirect response which caused this request + // to be created. This field is only populated during client + // redirects. + Response *Response + // ctx is either the client or server context. It should only // be modified via copying the whole Request using WithContext. // It is unexported to prevent people from using Context wrong |
