Skip to content

Fix - Http3FrameCodec decode fail during unknown settings#361

Merged
normanmaurer merged 1 commit intomainfrom
frame_fix
Feb 18, 2026
Merged

Fix - Http3FrameCodec decode fail during unknown settings#361
normanmaurer merged 1 commit intomainfrom
frame_fix

Conversation

@normanmaurer
Copy link
Member

Motivation:
The change in
netty/netty#15909 is merged but not yet released. While working on HTTP/3 connections I noticed a logical issue: when an unknown settings key is received, the current implementation returns a value, which causes Http3FrameCodec to treat it as an error (because settings.put(key, value) returns the previous value for known keys and null for new ones). For unknown keys we should ignore them, so we now always return null to achieve the expected behavior.

Modification:

  • settings.put(key, value) now returns null for unknown keys (non null triggers an error in Http3FrameCodec decoding).

  • Added unit tests to verify this.

Note: Http3CodecTest didn’t catch the issue previously because it used
frames produced by the same put logic, so both encoding and decoding behaved consistently and the issue was hidden.

Port of netty/netty#15998

**Motivation:**
The change in
[https://github.com/netty/netty/pull/15909](https://github.com/netty/netty/pull/15909)
is merged but not yet released. While working on HTTP/3 connections I
noticed a logical issue: when an unknown settings key is received, the
current implementation returns a value, which causes Http3FrameCodec to
treat it as an error (because settings.put(key, value) returns the
previous value for known keys and null for new ones). For unknown keys
we should ignore them, so we now always return null to achieve the
expected behavior.

**Modification:**
* [x] settings.put(key, value) now returns null for unknown keys (non
null triggers an error in Http3FrameCodec decoding).

* [x] Added unit tests to verify this.

> Note: Http3CodecTest didn’t catch the issue previously because it used
frames produced by the same put logic, so both encoding and decoding
behaved consistently and the issue was hidden.

Port of netty/netty#15998
@normanmaurer normanmaurer added this to the 0.0.31.Final milestone Feb 18, 2026
@normanmaurer normanmaurer merged commit 21ea64c into main Feb 18, 2026
5 checks passed
@normanmaurer normanmaurer deleted the frame_fix branch February 18, 2026 16:30
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.

1 participant