]> Cypherpunks repositories - gostls13.git/commitdiff
doc, net/http: add release notes for net/http and fix doc comments
authorAndrew Bonventre <andybons@golang.org>
Mon, 10 Jun 2019 17:44:56 +0000 (13:44 -0400)
committerAndrew Bonventre <andybons@golang.org>
Mon, 10 Jun 2019 20:32:36 +0000 (20:32 +0000)
Change-Id: I684e3522e387b2d96d5cfb2878d2f77bf4558443
Reviewed-on: https://go-review.googlesource.com/c/go/+/181545
Reviewed-by: Bryan C. Mills <bcmills@google.com>
doc/go1.13.html
src/net/http/server.go
src/net/http/transport.go

index ef4e0123e621450e73d8e798d99a1202f553f2b7..5caae1315d2293bbcdcbc4b6abc2bf0560c1308a 100644 (file)
@@ -220,23 +220,31 @@ TODO
 <dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
   <dd>
     <p><!-- CL 130256 -->
-      TODO: <a href="https://golang.org/cl/130256">https://golang.org/cl/130256</a>: introduce DialerAndTLSConfigSupportsHTTP2 in Transport
+      The new field <a href="/pkg/net/http/#Transport.ForceAttemptHTTP2"><code>Transport.ForceAttemptHTTP2</code></a>
+      controls whether HTTP/2 is enabled when a non-zero <code>Dial</code>, <code>DialTLS</code>, or <code>DialContext</code>
+      func or <code>TLSClientConfig</code> is provided.
     </p>
 
     <p><!-- CL 140357 -->
-      TODO: <a href="https://golang.org/cl/140357">https://golang.org/cl/140357</a>: make Transport.MaxConnsPerHost work for HTTP/2
+      When reusing HTTP/2, the <a href="/pkg/net/http#Transport"><code>Transport</code></a> no longer performs unnecessary TLS handshakes.
     </p>
 
     <p><!-- CL 154383 -->
-      TODO: <a href="https://golang.org/cl/154383">https://golang.org/cl/154383</a>: make TimeoutHandler&#39;s ResponseWriter implement Pusher
+      <a href="/pkg/net/http/#TimeoutHandler"><code>TimeoutHandler</code></a>'s
+      <a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a> now implements the
+      <a href="/pkg/net/http/#Pusher"><code>Pusher</code></a> and <a href="/pkg/net/http/#Flusher"><code>Flusher</code></a> interfaces.
     </p>
 
     <p><!-- CL 167681 -->
-      TODO: <a href="https://golang.org/cl/167681">https://golang.org/cl/167681</a>: add Server BaseContext &amp; ConnContext fields to control early context
+      The new <a href="/pkg/net/http#Server"><code>Server</code></a> fields
+      <a href="/pkg/net/http/#Server.BaseContext"><code>BaseContext</code></a> and
+      <a href="/pkg/net/http/#Server.ConnContext"><code>ConnContext</code></a>
+      allow finer control over the <a href="/pkg/context#Context"><code>Context</code></a> values provided to requests and connections.
     </p>
 
     <p><!-- CL 173658 -->
-      TODO: <a href="https://golang.org/cl/173658">https://golang.org/cl/173658</a>: export Header.Clone, reduce its allocations, use it everywhere
+      The new <a href="/pkg/net/http/#Header"><code>Header</code></a> method
+      <a href="/pkg/net/http/#Header.Clone"><code>Clone</code></a> returns a copy of the receiver.
     </p>
 
 </dl><!-- net/http -->
index 829bacfa833356562dff63847477eb96bf0f9853..e7323786358305935a93fb9420b4acd7463e0348 100644 (file)
@@ -2565,7 +2565,7 @@ type Server struct {
        BaseContext func(net.Listener) context.Context
 
        // ConnContext optionally specifies a function that modifies
-       // the context used for a newly connection c. The provided ctx
+       // the context used for a new connection c. The provided ctx
        // is derived from the base context and has a ServerContextKey
        // value.
        ConnContext func(ctx context.Context, c net.Conn) context.Context
index a3f674ca5c46a911f63e4d06fa5aa486b72f659a..26f642aa7a02b9f40c1dc2afa6feca0368ee8ec8 100644 (file)
@@ -271,8 +271,9 @@ type Transport struct {
        tlsNextProtoWasNil bool        // whether TLSNextProto was nil when the Once fired
 
        // ForceAttemptHTTP2 controls whether HTTP/2 is enabled when a non-zero
-       // TLSClientConfig or Dial, DialTLS or DialContext func is provided. By default, use of any those fields conservatively
-       // disables HTTP/2. To use a customer dialer or TLS config and still attempt HTTP/2
+       // Dial, DialTLS, or DialContext func or TLSClientConfig is provided.
+       // By default, use of any those fields conservatively disables HTTP/2.
+       // To use a custom dialer or TLS config and still attempt HTTP/2
        // upgrades, set this to true.
        ForceAttemptHTTP2 bool
 }