@@ -41,20 +41,19 @@ import (
41
41
// When following redirects, the Client will forward all headers set on the
42
42
// initial Request except:
43
43
//
44
- // • when forwarding sensitive headers like "Authorization",
45
- // "WWW-Authenticate", and "Cookie" to untrusted targets.
46
- // These headers will be ignored when following a redirect to a domain
47
- // that is not a subdomain match or exact match of the initial domain.
48
- // For example, a redirect from "foo.com" to either "foo.com" or "sub.foo.com"
49
- // will forward the sensitive headers, but a redirect to "bar.com" will not.
50
- //
51
- // • when forwarding the "Cookie" header with a non-nil cookie Jar.
52
- // Since each redirect may mutate the state of the cookie jar,
53
- // a redirect may possibly alter a cookie set in the initial request.
54
- // When forwarding the "Cookie" header, any mutated cookies will be omitted,
55
- // with the expectation that the Jar will insert those mutated cookies
56
- // with the updated values (assuming the origin matches).
57
- // If Jar is nil, the initial cookies are forwarded without change.
44
+ // - when forwarding sensitive headers like "Authorization",
45
+ // "WWW-Authenticate", and "Cookie" to untrusted targets.
46
+ // These headers will be ignored when following a redirect to a domain
47
+ // that is not a subdomain match or exact match of the initial domain.
48
+ // For example, a redirect from "foo.com" to either "foo.com" or "sub.foo.com"
49
+ // will forward the sensitive headers, but a redirect to "bar.com" will not.
50
+ // - when forwarding the "Cookie" header with a non-nil cookie Jar.
51
+ // Since each redirect may mutate the state of the cookie jar,
52
+ // a redirect may possibly alter a cookie set in the initial request.
53
+ // When forwarding the "Cookie" header, any mutated cookies will be omitted,
54
+ // with the expectation that the Jar will insert those mutated cookies
55
+ // with the updated values (assuming the origin matches).
56
+ // If Jar is nil, the initial cookies are forwarded without change.
58
57
type Client struct {
59
58
// Transport specifies the mechanism by which individual
60
59
// HTTP requests are made.
0 commit comments