]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.16: mention net/http.Transport.GetProxyConnectHeader
authorIan Lance Taylor <iant@golang.org>
Fri, 22 Jan 2021 02:10:47 +0000 (18:10 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 22 Jan 2021 06:35:43 +0000 (06:35 +0000)
For #40700
For #41048

Change-Id: Ida6bcaaf5edaa2bba9ba2b8e02ec9959481f8302
Reviewed-on: https://go-review.googlesource.com/c/go/+/285594
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
doc/go1.16.html

index b3166fbaf53dddfc5108caa0bc588c08e4c69ada..d7714888f2825ace00e3edf3e1fd3d448fe4b74c 100644 (file)
@@ -807,6 +807,19 @@ func TestFoo(t *testing.T) {
       <code>HTTPS_PROXY</code> is unset.
     </p>
 
+    <p><!-- 259917 -->
+      The <a href="/pkg/net/http/#Transport"><code>Transport</code></a>
+      type has a new field
+      <a href="/pkg/net/http/#Transport.GetProxyConnectHeader"><code>GetProxyConnectHeader</code></a>
+      which may be set to a function that returns headers to send to a
+      proxy during a <code>CONNECT</code> request.
+      In effect <code>GetProxyConnectHeader</code> is a dynamic
+      version of the existing field
+      <a href="/pkg/net/http/#Transport.ProxyConnectHeader"><code>ProxyConnectHeader</code></a>;
+      if <code>GetProxyConnectHeader</code> is not <code>nil</code>,
+      then <code>ProxyConnectHeader</code> is ignored.
+    </p>
+
     <p><!-- CL 243939 -->
       The new <a href="/pkg/net/http/#FS"><code>http.FS</code></a>
       function converts an <a href="/pkg/io/fs/#FS"><code>fs.FS</code></a>