]> Cypherpunks.ru repositories - gostls13.git/commitdiff
doc/go1.22: document minor net/http changes
authorDamien Neil <dneil@google.com>
Tue, 12 Dec 2023 19:27:01 +0000 (11:27 -0800)
committerGopher Robot <gobot@golang.org>
Tue, 12 Dec 2023 22:14:14 +0000 (22:14 +0000)
For #51971
For #61679

Change-Id: Ie7b44201a9c40f5563c6d6051d22ae807ad0480d
Reviewed-on: https://go-review.googlesource.com/c/go/+/549198
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
doc/go1.22.html

index 31218beba646413d257a57273fb78d7005cf3353..9cea5ba8c2b14650570bf31c9c5d81d82970acb9 100644 (file)
@@ -620,19 +620,24 @@ defer func() {
 <dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
   <dd>
     <p><!-- https://go.dev/issue/51971 -->
-      TODO: <a href="https://go.dev/issue/51971">https://go.dev/issue/51971</a>: add ServeFileFS, FileServerFS, NewFileTransportFS
+      The new functions
+      <a href="/pkg/net/http#ServeFileFS"><code>ServeFileFS</code></a>,
+      <a href="/pkg/net/http#FileServerFS"><code>FileServerFS</code></a>, and
+      <a href="/pkg/net/http#NewFileTransportFS"><code>NewFileTransportFS</code></a>
+      are versions of the existing
+      <code>ServeFile</code>, <code>FileServer</code>, and <code>NewFileTransport</code>,
+      operating on an <code>fs.FS</code>.
     </p>
 
     <p><!-- https://go.dev/issue/61410 -->
       TODO: <a href="https://go.dev/issue/61410">https://go.dev/issue/61410</a>: enhanced ServeMux routing
     </p>
 
-    <p><!-- CL 513956 -->
-      TODO: <a href="https://go.dev/cl/513956">https://go.dev/cl/513956</a>: net/http: add ServeFileFS, FileServerFS, NewFileTransportFS; modified api/next/51971.txt
-    </p>
-
-    <p><!-- CL 517336 -->
-      TODO: <a href="https://go.dev/cl/517336">https://go.dev/cl/517336</a>: net/http: disallow empty Content-Length header
+    <p><!-- https://go.dev/issue/61679 -->
+      The HTTP server and client now reject requests and responses containing
+      an invalid empty <code>Content-Length</code> header.
+      The previous behavior may be restored by setting
+      <a href="/doc/godebug"><code>GODEBUG</code></a> field <code>httplaxcontentlength=1</code>.
     </p>
 
     <p><!-- CL 528355 -->