Skip to content

Fix float matching in read-only HTTP/2 headers - #18294

Merged
normanmaurer merged 2 commits into
netty:4.2from
wozhenbang2004:patch-2
Nov 12, 2026
Merged

normanmaurer merged 2 commits into
netty:4.2from
wozhenbang2004:patch-2

Conversation

@wozhenbang2004

Copy link
Copy Markdown
Contributor

Motivation:

ReadOnlyHttp2Headers.containsFloat always returns false, even when a matching float value is present.

Modification:

Convert the supplied float to text and use the existing header lookup. Add a focused regression for matching values, duplicate header names, a different value, and an absent name.

Result:

Float matching is consistent with the other numeric header lookups.

Fixes #18260.

Motivation:

ReadOnlyHttp2Headers.containsFloat always returns false, even when a matching float value is present.

Modifications:

Convert the supplied float to text and delegate to the existing header lookup.

Result:

Float matching follows the other numeric header lookups.
Cover matching floats, repeated header values, a different value, and an absent header name.
@testlens-app

testlens-app Bot commented Nov 6, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 2a540ca
▶️ Tests: 53511 executed
⚪️ Checks: 26/26 completed


Learn more about TestLens at testlens.app/docs.

@normanmaurer normanmaurer added this to the 4.2.21.Final milestone Nov 12, 2026
@normanmaurer normanmaurer added needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. labels Nov 12, 2026
@normanmaurer
normanmaurer merged commit dbef5f3 into netty:4.2 Nov 12, 2026
28 checks passed
@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port PR for 5.0: #18361

@github-actions github-actions Bot removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Nov 12, 2026
@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port PR for 4.1: #18362

@github-actions github-actions Bot removed the needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. label Nov 12, 2026
normanmaurer pushed a commit that referenced this pull request Nov 13, 2026
Auto-port of #18294 to 5.0
Cherry-picked commit: dbef5f3

---
Motivation:

`ReadOnlyHttp2Headers.containsFloat` always returns false, even when a
matching float value is present.

Modification:

Convert the supplied float to text and use the existing header lookup.
Add a focused regression for matching values, duplicate header names, a
different value, and an absent name.

Result:

Float matching is consistent with the other numeric header lookups.

Fixes #18260.

Co-authored-by: Kayokoi <[email protected]>
normanmaurer pushed a commit that referenced this pull request Nov 13, 2026
Auto-port of #18294 to 4.1
Cherry-picked commit: dbef5f3

---
Motivation:

`ReadOnlyHttp2Headers.containsFloat` always returns false, even when a
matching float value is present.

Modification:

Convert the supplied float to text and use the existing header lookup.
Add a focused regression for matching values, duplicate header names, a
different value, and an absent name.

Result:

Float matching is consistent with the other numeric header lookups.

Fixes #18260.

Co-authored-by: Kayokoi <[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.

ReadOnlyHttp2Headers.containsFloat always returns false

3 participants