std/net/http: Fix chunked response terminator #1476

Merged
vyzo merged 2 commits from jay/gerbil:bug-chunked-response-terminator into v0.19-std 2026-07-28 13:59:45 +00:00
Member

RFC 9112 section 7.1 requires the chunked response body to end with 0\r\n\r\n. The writer previously emitted only 0\r\n, which strict clients treated as an incomplete response. Chunked responses now include the final CRLF after the zero-size chunk.

[RFC 9112 section 7.1](https://datatracker.ietf.org/doc/html/rfc9112#section-7.1) requires the chunked response body to end with `0\r\n\r\n`. The writer previously emitted only `0\r\n`, which strict clients treated as an incomplete response. Chunked responses now include the final CRLF after the zero-size chunk.
jay requested review from Owners 2026-07-28 02:04:00 +00:00
jay changed title from Fix chunked response terminator to std/net/http: Fix chunked response terminator 2026-07-28 02:05:08 +00:00
vyzo approved these changes 2026-07-28 13:59:14 +00:00
vyzo left a comment

thank you!

thank you!
vyzo merged commit b91bfc0b3d into v0.19-std 2026-07-28 13:59:45 +00:00
vyzo deleted branch bug-chunked-response-terminator 2026-07-28 14:00:07 +00:00
Sign in to join this conversation.
No description provided.