From ef7184012a25f3e38da64e377d63ddbaef40b527 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Wed, 14 Oct 2026 10:38:03 +0200 Subject: [PATCH] http2: do not update progress on END_STREAM without END_HEADERS As more continuation frames are expected. Next commit will update progress for those continuation frames. Ticket: 9217 --- rust/src/http2/http2.rs | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/rust/src/http2/http2.rs b/rust/src/http2/http2.rs index de51ff4aab..cf286a4773 100644 --- a/rust/src/http2/http2.rs +++ b/rust/src/http2/http2.rs @@ -566,8 +566,10 @@ impl HTTP2Transaction { &mut stream_tx.progress_tc }; match data { - HTTP2FrameTypeData::HEADERS(_) | HTTP2FrameTypeData::DATA => { - if header.flags & parser::HTTP2_FLAG_HEADER_EOS != 0 { + HTTP2FrameTypeData::HEADERS(_) => { + if header.flags & parser::HTTP2_FLAG_HEADER_EOS != 0 + && header.flags & parser::HTTP2_FLAG_HEADER_END_HEADERS != 0 + { if *state < HTTP2TxProgress::HTTP2ProgClosed { *state = HTTP2TxProgress::HTTP2ProgClosed; if stream_tx.progress_ts == HTTP2TxProgress::HTTP2ProgClosed @@ -577,15 +579,26 @@ impl HTTP2Transaction { stream_tx.progress_tc = HTTP2TxProgress::HTTP2ProgComplete; } } - } else if header.ftype == parser::HTTP2FrameType::Data as u8 { - //not end of stream - if *state < HTTP2TxProgress::HTTP2ProgData { - *state = HTTP2TxProgress::HTTP2ProgData; - } } else if *state < HTTP2TxProgress::HTTP2ProgHeaders { *state = HTTP2TxProgress::HTTP2ProgHeaders; } } + HTTP2FrameTypeData::DATA => { + if header.flags & parser::HTTP2_FLAG_HEADER_EOS != 0 { + if *state < HTTP2TxProgress::HTTP2ProgClosed { + *state = HTTP2TxProgress::HTTP2ProgClosed; + if stream_tx.progress_ts == HTTP2TxProgress::HTTP2ProgClosed + && stream_tx.progress_tc == HTTP2TxProgress::HTTP2ProgClosed + { + stream_tx.progress_ts = HTTP2TxProgress::HTTP2ProgComplete; + stream_tx.progress_tc = HTTP2TxProgress::HTTP2ProgComplete; + } + } + } else if *state < HTTP2TxProgress::HTTP2ProgData { + //not end of stream + *state = HTTP2TxProgress::HTTP2ProgData; + } + } _ => {} } }