Skip to content

Commit 794e7ea

Browse files
abhinavgopherbot
authored andcommitted
net/http: use new Go Doc list syntax
This tweaks the documentation for http.Client to use the list syntax introduced in Go 1.19. Change-Id: I1f7e0256c13f57e04fc76e5e2362608c8f9f524d GitHub-Last-Rev: 11d384f GitHub-Pull-Request: #62574 Reviewed-on: https://go-review.googlesource.com/c/go/+/527335 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]>
1 parent 2c74018 commit 794e7ea

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

src/net/http/client.go

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,19 @@ import (
4141
// When following redirects, the Client will forward all headers set on the
4242
// initial Request except:
4343
//
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.
5857
type Client struct {
5958
// Transport specifies the mechanism by which individual
6059
// HTTP requests are made.

0 commit comments

Comments
 (0)