Skip to content

Commit 89c532e

Browse files
neildgopherbot
authored andcommitted
doc/go1.22: document minor net/http changes
For #51971 For #61679 Change-Id: Ie7b44201a9c40f5563c6d6051d22ae807ad0480d Reviewed-on: https://go-review.googlesource.com/c/go/+/549198 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Damien Neil <[email protected]> Reviewed-by: Mauri de Souza Meneguzzo <[email protected]> Reviewed-by: Roland Shoemaker <[email protected]>
1 parent dce7f33 commit 89c532e

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

doc/go1.22.html

+12-7
Original file line numberDiff line numberDiff line change
@@ -620,19 +620,24 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
620620
<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>
621621
<dd>
622622
<p><!-- https://go.dev/issue/51971 -->
623-
TODO: <a href="https://go.dev/issue/51971">https://go.dev/issue/51971</a>: add ServeFileFS, FileServerFS, NewFileTransportFS
623+
The new functions
624+
<a href="/pkg/net/http#ServeFileFS"><code>ServeFileFS</code></a>,
625+
<a href="/pkg/net/http#FileServerFS"><code>FileServerFS</code></a>, and
626+
<a href="/pkg/net/http#NewFileTransportFS"><code>NewFileTransportFS</code></a>
627+
are versions of the existing
628+
<code>ServeFile</code>, <code>FileServer</code>, and <code>NewFileTransport</code>,
629+
operating on an <code>fs.FS</code>.
624630
</p>
625631

626632
<p><!-- https://go.dev/issue/61410 -->
627633
TODO: <a href="https://go.dev/issue/61410">https://go.dev/issue/61410</a>: enhanced ServeMux routing
628634
</p>
629635

630-
<p><!-- CL 513956 -->
631-
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
632-
</p>
633-
634-
<p><!-- CL 517336 -->
635-
TODO: <a href="https://go.dev/cl/517336">https://go.dev/cl/517336</a>: net/http: disallow empty Content-Length header
636+
<p><!-- https://go.dev/issue/61679 -->
637+
The HTTP server and client now reject requests and responses containing
638+
an invalid empty <code>Content-Length</code> header.
639+
The previous behavior may be restored by setting
640+
<a href="/doc/godebug"><code>GODEBUG</code></a> field <code>httplaxcontentlength=1</code>.
636641
</p>
637642

638643
<p><!-- CL 528355 -->

0 commit comments

Comments
 (0)