Skip to content

Commit bcd3385

Browse files
committed
doc/go1.12: flesh out net, etc
Change-Id: I081400286544d88eec83a8b332b9f7934fd76ae2 Reviewed-on: https://go-review.googlesource.com/c/152539 Reviewed-by: Ian Lance Taylor <iant@golang.org>
1 parent 805312a commit bcd3385

File tree

1 file changed

+37
-21
lines changed

1 file changed

+37
-21
lines changed

doc/go1.12.html

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,6 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
211211

212212
</dl><!-- crypto/rc4 -->
213213

214-
<dl id="crypto/tls, net/http"><dt><a href="/pkg/crypto/tls, net/http/">crypto/tls, net/http</a></dt>
215-
<dd>
216-
<p><!-- CL 143177 -->
217-
TODO: <a href="https://golang.org/cl/143177">https://golang.org/cl/143177</a>: reject HTTP requests to HTTPS server
218-
</p>
219-
220-
</dl><!-- crypto/tls, net/http -->
221-
222214
<dl id="database/sql"><dt><a href="/pkg/database/sql/">database/sql</a></dt>
223215
<dd>
224216
<p><!-- CL 145738 -->
@@ -337,48 +329,72 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
337329

338330
<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
339331
<dd>
340-
<p><!-- CL 113997 -->
341-
TODO: <a href="https://golang.org/cl/113997">https://golang.org/cl/113997</a>: use splice(2) on Linux when reading from UnixConn, rework splice tests
342-
</p>
343-
344332
<p><!-- CL 146659 -->
345-
TODO: <a href="https://golang.org/cl/146659">https://golang.org/cl/146659</a>: enable RFC 6555 Fast Fallback by default
333+
The
334+
<a href="/pkg/net/#Dialer.DualStack"><code>Dialer.DualStack</code></a> setting is now ignored and deprecated;
335+
RFC 6555 Fast Fallback ("Happy Eyeballs") is now enabled by default. To disable, set
336+
<a href="/pkg/net/#Dialer.FallbackDelay"><code>Dialer.FallbackDelay</code></a> to a negative value.
346337
</p>
347338

348339
<p><!-- CL 107196 -->
349-
TODO: <a href="https://golang.org/cl/107196">https://golang.org/cl/107196</a>: enable TCP keepalives by default
340+
Similarly, TCP keep-alives are now enabled by default if
341+
<a href="/pkg/net/#Dialer.KeepAlive"><code>Dialer.KeepAlive</code></a> is zero.
342+
To disable, set it to a negative value.
350343
</p>
351344

345+
<p><!-- CL 113997 -->
346+
On Linux, the <a href="http://man7.org/linux/man-pages/man2/splice.2.html"><code>splice</code> system call</a> is now used when copying from a
347+
<a href="/pkg/net/#UnixConn"><code>UnixConn</code></a> to a
348+
<a href="/pkg/net/#TCPConn"><code>TCPConn</code></a>.
349+
</p>
352350
</dl><!-- net -->
353351

354352
<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
355353
<dd>
354+
<p><!-- CL 143177 -->
355+
The HTTP server now rejects misdirected HTTP requests to HTTPS servers with a plaintext "400 Bad Request" response.
356+
</p>
357+
356358
<p><!-- CL 130115 -->
357-
TODO: <a href="https://golang.org/cl/130115">https://golang.org/cl/130115</a>: add Client.CloseIdleConnections
359+
The new <a href="/pkg/net/http/#Client.CloseIdleConnections"><code>Client.CloseIdleConnections</code></a>
360+
method calls the <code>Client</code>'s underlying <code>Transport</code>'s <code>CloseIdleConnections</code>
361+
if it has one.
358362
</p>
359363

360364
<p><!-- CL 145398 -->
361-
TODO: <a href="https://golang.org/cl/145398">https://golang.org/cl/145398</a>: in Transport, don&#39;t error on non-chunked response with Trailer header
365+
The <a href="/pkg/net/http/#Transport"><code>Transport</code></a> no longer rejects HTTP responses which declare
366+
HTTP Trailers but don't use chunked encoding. Instead, the declared trailers are now just ignored.
362367
</p>
363368

364-
<p><!-- CL 152080 -->
365-
TODO: <a href="https://golang.org/cl/152080">https://golang.org/cl/152080</a>: update bundled x/net/http2
369+
<p><!-- CL 152080 --> <!-- CL 151857 -->
370+
The <a href="/pkg/net/http/#Transport"><code>Transport</code></a> no longer handles <code>MAX_CONCURRENT_STREAMS</code> values
371+
advertised from HTTP/2 servers as strictly as it did during Go 1.10 and Go 1.11. The default behavior is now back
372+
to how it was in Go 1.9: each connection to a server can have up to <code>MAX_CONCURRENT_STREAMS</code> requests
373+
active and then new TCP connections are created as needed. In Go 1.10 and Go 1.11 the <code>http2</code> package
374+
would block and wait for requests to finish instead of creating new connections.
375+
To get the stricter behavior back, import the
376+
<a href="https://godoc.org/golang.org/x/net/http2"><code>golang.org/x/net/http2</code></a> package
377+
directly and set
378+
<a href="https://godoc.org/golang.org/x/net/http2#Transport.StrictMaxConcurrentStreams"><code>Transport.StrictMaxConcurrentStreams</code></a> to
379+
<code>true</code>.
366380
</p>
367381

368382
</dl><!-- net/http -->
369383

370384
<dl id="net/http/httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
371385
<dd>
372386
<p><!-- CL 146437 -->
373-
TODO: <a href="https://golang.org/cl/146437">https://golang.org/cl/146437</a>: make ReverseProxy automatically proxy WebSocket requests
387+
The <a href="/pkg/net/http/httputil/#ReverseProxy"><code>ReverseProxy</code></a> now automatically
388+
proxies WebSocket requests.
374389
</p>
375390

376391
</dl><!-- net/http/httputil -->
377392

378393
<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
379394
<dd>
380395
<p><!-- CL 125443 -->
381-
TODO: <a href="https://golang.org/cl/125443">https://golang.org/cl/125443</a>: add ExitCode method to ProcessState
396+
The new <a href="/pkg/os/#ProcessState.ExitCode"><code>ProcessState.ExitCode</code></a> method
397+
returns the process's exit code.
382398
</p>
383399

384400
<p><!-- CL 135075 -->
@@ -442,7 +458,7 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
442458
<dl id="strings"><dt><a href="/pkg/strings/">strings</a></dt>
443459
<dd>
444460
<p><!-- CL 122835 -->
445-
TODO: <a href="https://golang.org/cl/122835">https://golang.org/cl/122835</a>: add Builder.Cap
461+
The new <a href="/pkg/strings/#Builder.Cap"><code>Builder.Cap</code></a> method returns the capacity of the builder's underlying byte slice.
446462
</p>
447463

448464
<p><!-- CL 131495 -->

0 commit comments

Comments
 (0)