Skip to content

Auto-port 4.1: Http2ConnectionHandler: report at most one stream error for a CompositeStreamException - #17595

Merged
normanmaurer merged 1 commit into
4.1from
auto-port-pr-17470-to-4.1
Sep 22, 2026
Merged

normanmaurer merged 1 commit into
4.1from
auto-port-pr-17470-to-4.1

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #17470 to 4.1
Cherry-picked commit: 9676719


Motivation:

RFC 9113, Section 5.4 states that implementations SHOULD report at
most one stream and one connection error as a result of processing a
single condition, even if multiple errors are discovered. When
DefaultHttp2LocalFlowController accumulates per-stream failures (e.g.
while applying a new SETTINGS initial window size) into a single
CompositeStreamException, Http2ConnectionHandler.onError iterated all
contained StreamExceptions and wrote an RST_STREAM for each one,
exceeding the recommended limit of one stream error per result.

Modifications:

  • Http2ConnectionHandler.onError only reports the first StreamException
    contained in a CompositeStreamException instead of iterating and
    reporting every one of them.
  • Add unit tests

Result:

Only one RST_STREAM is written per CompositeStreamException, in line
with the RFC 9113 recommendation.

…teStreamException (#17470)

Motivation:

RFC 9113, Section 5.4 states that implementations SHOULD report at
most one stream and one connection error as a result of processing a
single condition, even if multiple errors are discovered. When
DefaultHttp2LocalFlowController accumulates per-stream failures (e.g.
while applying a new SETTINGS initial window size) into a single
CompositeStreamException, Http2ConnectionHandler.onError iterated all
contained StreamExceptions and wrote an RST_STREAM for each one,
exceeding the recommended limit of one stream error per result.

Modifications:

- Http2ConnectionHandler.onError only reports the first StreamException
  contained in a CompositeStreamException for a specific stream instead of iterating and
  reporting every one of them.
- Add unit tests

Result:

Only one RST_STREAM is written per CompositeStreamException, in line
with the RFC 9113 recommendation.

(cherry picked from commit 9676719)
@testlens-app

testlens-app Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 18b1b6b
▶️ Tests: 394352 executed
⚪️ Checks: 18/18 completed


Learn more about TestLens at testlens.app/docs.

@normanmaurer normanmaurer added this to the 4.1.139.Final milestone Sep 22, 2026
@normanmaurer
normanmaurer merged commit cc81744 into 4.1 Sep 22, 2026
19 checks passed
@normanmaurer
normanmaurer deleted the auto-port-pr-17470-to-4.1 branch September 22, 2026 21:54
lltopk pushed a commit to lltopk/netty that referenced this pull request Oct 24, 2026
…r for a CompositeStreamException (netty#17595)

Auto-port of netty#17470 to 4.1
Cherry-picked commit: 9676719

---
Motivation:

RFC 9113, Section 5.4 states that implementations SHOULD report at
most one stream and one connection error as a result of processing a
single condition, even if multiple errors are discovered. When
DefaultHttp2LocalFlowController accumulates per-stream failures (e.g.
while applying a new SETTINGS initial window size) into a single
CompositeStreamException, Http2ConnectionHandler.onError iterated all
contained StreamExceptions and wrote an RST_STREAM for each one,
exceeding the recommended limit of one stream error per result.

Modifications:

- Http2ConnectionHandler.onError only reports the first StreamException
  contained in a CompositeStreamException instead of iterating and
  reporting every one of them.
- Add unit tests

Result:

Only one RST_STREAM is written per CompositeStreamException, in line
with the RFC 9113 recommendation.

Co-authored-by: Norman Maurer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants