Skip to content

Commit 346698e

Browse files
committed
doc/go1.19: add release notes for net/http and net/url
For #51400 Change-Id: I6412132db79074eef7d2cb3d66456c48b0d745a3 Reviewed-on: https://go-review.googlesource.com/c/go/+/408877 TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Damien Neil <[email protected]> Reviewed-by: Russ Cox <[email protected]> Reviewed-by: Carlos Amedee <[email protected]>
1 parent 7a82c68 commit 346698e

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

doc/go1.19.html

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -578,22 +578,46 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
578578
<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
579579
<dd>
580580
<p><!-- CL 269997 -->
581-
TODO: <a href="https://go.dev/cl/269997">https://go.dev/cl/269997</a>: allow sending 1xx responses
581+
<a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter.WriteHeader</code></a>
582+
now supports sending user-defined 1xx informational headers.
582583
</p>
583-
<p><!-- https://go.dev/issue/30715 --><!-- CL 361397 -->
584-
TODO: <a href="https://go.dev/cl/361397">https://go.dev/cl/361397</a>: net/http: add MaxBytesError; modified api/next/30715.txt
585-
TODO: <a href="https://go.dev/issue/30715">https://go.dev/issue/30715</a>: add MaxBytesError
584+
585+
<p><!-- CL 361397 -->
586+
The <code>io.ReadCloser</code> returned by
587+
<a href="/pkg/net/http/#MaxBytesReader"><code>MaxBytesReader</code></a>
588+
will now return the defined error type
589+
<a href="/pkg/net/http/#MaxBytesError"><code>MaxBytesError</code></a>
590+
when its read limit is exceeded.
591+
</p>
592+
593+
<p><!-- CL 375354 -->
594+
The HTTP client will handle a 3xx response without a
595+
<code>Location</code> header by returning it to the caller,
596+
rather than treating it as an error.
586597
</p>
587598
</dd>
588599
</dl><!-- net/http -->
589600

590601
<dl id="net/url"><dt><a href="/pkg/net/url/">net/url</a></dt>
591602
<dd>
592-
<p><!-- https://go.dev/issue/47005 --><!-- CL 374654 -->
593-
TODO: <a href="https://go.dev/cl/374654">https://go.dev/cl/374654</a>: add JoinPath, URL.JoinPath
603+
<p><!-- CL 374654 -->
604+
The new
605+
<a href="/pkg/net/url/#JoinPath"><code>JoinPath</code></a>
606+
function and
607+
<a href="/pkg/net/url/#URL.JoinPath"><code>URL.JoinPath</code></a>
608+
method create a new <code>URL</code> by joining a list of path
609+
elements.
594610
</p>
595611
<p><!-- https://go.dev/issue/46059 -->
596-
TODO: <a href="https://go.dev/issue/46059">https://go.dev/issue/46059</a>: add OmitHost bool to URL
612+
The <code>URL</code> type now distinguishes between URLs with no
613+
authority and URLs with an empty authority. For example,
614+
<code>http:///path</code> has an empty authority (host),
615+
while <code>http:/path</code> has none.
616+
</p>
617+
<p>
618+
The new <a href="/pkg/net/url/#URL"><code>URL</code></a> field
619+
<code>OmitHost</code> is set to <code>true</code> when a
620+
<code>URL</code> has an empty authority.
597621
</p>
598622

599623
</dd>

0 commit comments

Comments
 (0)