]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.19: add release notes for net/http and net/url
authorDamien Neil <dneil@google.com>
Thu, 26 May 2022 22:09:34 +0000 (15:09 -0700)
committerDamien Neil <dneil@google.com>
Tue, 7 Jun 2022 19:47:46 +0000 (19:47 +0000)
For #51400

Change-Id: I6412132db79074eef7d2cb3d66456c48b0d745a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/408877
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
doc/go1.19.html

index 2674ad6972b409da85205f3b8434cc0ca0ee7ac9..b8d372224a13819fc084fa04159eb15e2e3b97ea 100644 (file)
@@ -578,22 +578,46 @@ Do not send CLs removing the interior tags from such phrases.
 <dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
   <dd>
     <p><!-- CL 269997 -->
-      TODO: <a href="https://go.dev/cl/269997">https://go.dev/cl/269997</a>: allow sending 1xx responses
+      <a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter.WriteHeader</code></a>
+      now supports sending user-defined 1xx informational headers.
     </p>
-    <p><!-- https://go.dev/issue/30715 --><!-- CL 361397 -->
-      TODO: <a href="https://go.dev/cl/361397">https://go.dev/cl/361397</a>: net/http: add MaxBytesError; modified api/next/30715.txt
-      TODO: <a href="https://go.dev/issue/30715">https://go.dev/issue/30715</a>: add MaxBytesError
+
+    <p><!-- CL 361397 -->
+      The <code>io.ReadCloser</code> returned by
+      <a href="/pkg/net/http/#MaxBytesReader"><code>MaxBytesReader</code></a>
+      will now return the defined error type
+      <a href="/pkg/net/http/#MaxBytesError"><code>MaxBytesError</code></a>
+      when its read limit is exceeded.
+    </p>
+
+    <p><!-- CL 375354 -->
+      The HTTP client will handle a 3xx response without a
+      <code>Location</code> header by returning it to the caller,
+      rather than treating it as an error.
     </p>
   </dd>
 </dl><!-- net/http -->
 
 <dl id="net/url"><dt><a href="/pkg/net/url/">net/url</a></dt>
   <dd>
-    <p><!-- https://go.dev/issue/47005 --><!-- CL 374654 -->
-      TODO: <a href="https://go.dev/cl/374654">https://go.dev/cl/374654</a>: add JoinPath, URL.JoinPath
+    <p><!-- CL 374654 -->
+      The new
+      <a href="/pkg/net/url/#JoinPath"><code>JoinPath</code></a>
+      function and
+      <a href="/pkg/net/url/#URL.JoinPath"><code>URL.JoinPath</code></a>
+      method create a new <code>URL</code> by joining a list of path
+      elements.
     </p>
     <p><!-- https://go.dev/issue/46059 -->
-      TODO: <a href="https://go.dev/issue/46059">https://go.dev/issue/46059</a>: add OmitHost bool to URL
+      The <code>URL</code> type now distinguishes between URLs with no
+      authority and URLs with an empty authority. For example,
+      <code>http:///path</code> has an empty authority (host),
+      while <code>http:/path</code> has none.
+    </p>
+    <p>
+      The new <a href="/pkg/net/url/#URL"><code>URL</code></a> field
+      <code>OmitHost</code> is set to <code>true</code> when a
+      <code>URL</code> has an empty authority.
     </p>
 
   </dd>