- From: Lucas Pardue <lucas@lucaspardue.com>
- Date: Mon, 02 Mar 2026 21:51:04 +0000
- To: "Sean McArthur" <sean@seanmonstar.com>
- Cc: "HTTP Working Group" <ietf-http-wg@w3.org>
- Message-Id: <17aa2baa-dd51-45ef-924b-c93ecb233a2d@app.fastmail.com>
On Mon, Mar 2, 2026, at 21:44, Sean McArthur wrote: > It reads like you can send the END_STREAM flag on the HEADERS frame, without END_HEADERS, and then send CONTINUATION frames, and when they end, the stream ends. > > https://httpwg.org/specs/rfc9113.html#HEADERS > > > A HEADERS frame with the END_STREAM flag set signals the end of a stream. However, a HEADERS frame with the END_STREAM flag set can be followed by CONTINUATION frames on the same stream. Logically, the CONTINUATION frames are part of the HEADERS frame. Thanks Sean, I missed that! Also seems reinforced by https://www.rfc-editor.org/rfc/rfc9113.html#section-8.1-5 > The last frame in the sequence bears an END_STREAM flag, noting that a HEADERS <https://www.rfc-editor.org/rfc/rfc9113.html#HEADERS> frame with the END_STREAM flag set can be followed by CONTINUATION <https://www.rfc-editor.org/rfc/rfc9113.html#CONTINUATION> frames that carry any remaining fragments of the field block. Cheers, Lucas > > On Mon, Mar 2, 2026, 4:39 PM Lucas Pardue <lucas@lucaspardue.com> wrote: >> __ >> Hi folks, >> >> I was looking again at HTTP/2 frames and realized that CONTINUATION frames don't have an END_STREAM flag. Knowing why this is the case is not critical to anything but it got me curious. >> >> Its possible to send HEADERS with END_STREAM=1, to send a request or response with no DATA frames at all. However, it seems any stream that uses CONTINUATION but has no HTTP content to send would have to use a sequence like: >> >> 1. HEADERS (END_HEADERS=0, END_STREAM=0), >> 2. CONTINUATION (END_HEADERS=1), >> 3. DATA (LENGTH=0, END_STREAM=1). >> >> Empty DATA frames to signal stream close are not themselves a problem. The deployments I'm familiar with regularly send them. >> >> However, this raises an issue for anyone that might try to use CONTINUATION in trailers. You can't can't clean close the stream: >> >> 1. HEADERS (END_HEADERS=1, END_STREAM=0), >> 2. DATA (END_STREAM=0), >> 3. HEADERS (END_HEADERS=0, END_STREAM=0), CONTINUATION (END_HEADERS=1) >> 4. Not valid to send DATA again, oops >> >> Cheers, >> Lucas
Received on Monday, 2 March 2026 21:52:55 UTC