]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: use new Go Doc list syntax
authorAbhinav Gupta <mail@abhinavg.net>
Wed, 13 Sep 2023 15:55:06 +0000 (15:55 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 13 Sep 2023 18:35:12 +0000 (18:35 +0000)
This tweaks the documentation for http.Client
to use the list syntax introduced in Go 1.19.

Change-Id: I1f7e0256c13f57e04fc76e5e2362608c8f9f524d
GitHub-Last-Rev: 11d384f9adb25605d44dbb7aaeec88fbb3b457ed
GitHub-Pull-Request: golang/go#62574
Reviewed-on: https://go-review.googlesource.com/c/go/+/527335
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>

src/net/http/client.go

index 5478690ecf874d9bd0220ced48707e02e3cb7cba..5fd86a1ec88cd30eb2d2551307a825f5a3cf3460 100644 (file)
@@ -41,20 +41,19 @@ import (
 // When following redirects, the Client will forward all headers set on the
 // initial Request except:
 //
-// • when forwarding sensitive headers like "Authorization",
-// "WWW-Authenticate", and "Cookie" to untrusted targets.
-// These headers will be ignored when following a redirect to a domain
-// that is not a subdomain match or exact match of the initial domain.
-// For example, a redirect from "foo.com" to either "foo.com" or "sub.foo.com"
-// will forward the sensitive headers, but a redirect to "bar.com" will not.
-//
-// • when forwarding the "Cookie" header with a non-nil cookie Jar.
-// Since each redirect may mutate the state of the cookie jar,
-// a redirect may possibly alter a cookie set in the initial request.
-// When forwarding the "Cookie" header, any mutated cookies will be omitted,
-// with the expectation that the Jar will insert those mutated cookies
-// with the updated values (assuming the origin matches).
-// If Jar is nil, the initial cookies are forwarded without change.
+//   - when forwarding sensitive headers like "Authorization",
+//     "WWW-Authenticate", and "Cookie" to untrusted targets.
+//     These headers will be ignored when following a redirect to a domain
+//     that is not a subdomain match or exact match of the initial domain.
+//     For example, a redirect from "foo.com" to either "foo.com" or "sub.foo.com"
+//     will forward the sensitive headers, but a redirect to "bar.com" will not.
+//   - when forwarding the "Cookie" header with a non-nil cookie Jar.
+//     Since each redirect may mutate the state of the cookie jar,
+//     a redirect may possibly alter a cookie set in the initial request.
+//     When forwarding the "Cookie" header, any mutated cookies will be omitted,
+//     with the expectation that the Jar will insert those mutated cookies
+//     with the updated values (assuming the origin matches).
+//     If Jar is nil, the initial cookies are forwarded without change.
 type Client struct {
        // Transport specifies the mechanism by which individual
        // HTTP requests are made.