Skip to content

Commit 11d384f

Browse files
committed
net/http: use new Go Doc list syntax
Tweaks the documentation for http.Client to use the list syntax introduced in Go 1.19.
1 parent 584aad5 commit 11d384f

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)