mirror of
https://github.com/golang/go
synced 2024-11-26 19:41:19 -07:00
doc/go1.13: add more release notes for net/http
Fixes #33396 Change-Id: Id975a23b8d6555a3f19ef283fccbbe122f10acfe Reviewed-on: https://go-review.googlesource.com/c/go/+/188477 Reviewed-by: Andrew Bonventre <andybons@golang.org>
This commit is contained in:
parent
ea8b0acdac
commit
d6f6a46c07
@ -713,6 +713,13 @@ godoc
|
||||
|
||||
<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
|
||||
<dd>
|
||||
<p><!-- CL 76410 -->
|
||||
The new fields <a href="/pkg/net/http/#Transport.WriteBufferSize"><code>Transport.WriteBufferSize</code></a>
|
||||
and <a href="/pkg/net/http/#Transport.ReadBufferSize"><code>Transport.ReadBufferSize</code></a>
|
||||
allow one to specify the sizes of the write and read buffers for a <a href="/pkg/net/http/#Transport"><code>Transport</code></a>.
|
||||
If either field is zero, a default size of 4KB is used.
|
||||
</p>
|
||||
|
||||
<p><!-- CL 130256 -->
|
||||
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>
|
||||
@ -729,6 +736,15 @@ godoc
|
||||
<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 157339 -->
|
||||
The <code>StatusCode</code> <code>103</code> <code>"Early Hints"</code> has been added.
|
||||
</p>
|
||||
|
||||
<p><!-- CL 167017 -->
|
||||
On encountering unsupported transfer-encodings, <a href="/pkg/net/http/#Server"><code>http.Server</code></a> now
|
||||
returns a "501 Unimplemented" status as mandated by the HTTP specification <a href="https://tools.ietf.org/html/rfc7230#section-3.3.1">RFC 7230 Section 3.3.1</a>.
|
||||
</p>
|
||||
|
||||
<p><!-- CL 167681 -->
|
||||
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
|
||||
@ -736,11 +752,26 @@ godoc
|
||||
allow finer control over the <a href="/pkg/context#Context"><code>Context</code></a> values provided to requests and connections.
|
||||
</p>
|
||||
|
||||
<p><!-- CL 167781 -->
|
||||
<a href="/pkg/net/http#DetectContentType"><code>http.DetectContentType</code></a> now correctly detects RAR signatures, and can now also detect RAR v5 signatures.
|
||||
</p>
|
||||
|
||||
<p><!-- CL 173658 -->
|
||||
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>
|
||||
|
||||
<p><!-- CL 174324 -->
|
||||
A new function <a href="/pkg/net/http/#NewRequestWithContext"><code>NewRequestWithContext</code></a> has been added and it
|
||||
accepts a <a href="/pkg/context/#Context"><code>Context</code></a> that controls the entire lifetime of
|
||||
the created outgoing <a href="/pkg/net/http/#Request"><code>Request</code></a>, suitable for use with
|
||||
<a href="/pkg/net/http/#Client.Do"><code>Client.Do</code></a> and <a href="/pkg/net/http/#Transport.RoundTrip"><code>Transport.RoundTrip</code></a>
|
||||
</p>
|
||||
|
||||
<p><!-- CL 179457 -->
|
||||
<a href="/pkg/net/http/#Transport"><code>Transport</code></a> now silently ignores a <code>408 "Request Timeout"</code> response.
|
||||
</p>
|
||||
|
||||
</dl><!-- net/http -->
|
||||
|
||||
<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
|
||||
|
Loading…
Reference in New Issue
Block a user