GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Reject control characters at the boundary of the HTTP version token by HwangRock · Pull Request #16971 · netty/netty

Conversation

@HwangRock

@HwangRock HwangRock commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Motivation:

HttpRequestDecoder accepts a request whose HTTP-version token carries a boundary control byte (NUL, CR, LF, VT, FF, …):

printf 'GET / \x00HTTP/1.1\r\nHost: localhost\r\n\r\n' | nc <host> <port>
# decoded as a clean HTTP/1.1 request; no decoder failure

HttpVersion.valueOf(String, boolean) ran text.trim() before matching the version, and String.trim() removes every character with code point <= 0x20. The boundary control byte was therefore silently stripped and the surviving "HTTP/1.1" matched the cached constant, so the malformed request decoded as a clean HTTP/1.1 one.

The method token on the same request line already rejects such a byte since #16723 (issue #15047), so the two tokens were inconsistent — this is the same boundary-control-character / request-smuggling class, left open for the version token.

Modification:

  • HttpVersion: drop the trim() in valueOf and in the HttpVersion(String, boolean, boolean) constructor. The existing strict format check (length == 8 && startsWith("HTTP/") && charAt(6) == '.') now rejects a token padded with a control byte, and the non-strict path rejects control/whitespace in the protocol name via hasControlOrWhitespace. Without the trim(), SP/HT padding is rejected too, mirroring the method-token behaviour from Reject control characters at the boundary of HTTP method names #16723.
  • RtspVersions.valueOf: drop the trim() the same way.

HttpRequestDecoder already turns createMessage exceptions into a decoder failure, so the wire effect is decoderResult().isSuccess() == false instead of a phantom HTTP/1.1.

Result:

Before this change "GET / \x00HTTP/1.1\r\n…" decoded successfully (decoderResult().isSuccess() == true, protocolVersion() == HTTP_1_1); after it the decoder reports a failure, matching the method-token behaviour. A clean HTTP/1.1 request still decodes as before.

Test set: io.netty.handler.codec.http.HttpVersionParsingTest
Tests run: 53, Failures: 0, Errors: 0, Skipped: 0
Test set: io.netty.handler.codec.http.HttpRequestDecoderTest
Tests run: 85, Failures: 0, Errors: 0, Skipped: 0
Test set: io.netty.handler.codec.rtsp.RtspDecoderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
Test set: io.netty.handler.codec.rtsp.RtspEncoderTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0

Fixes #16970

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
HwangRock and others added 2 commits June 18, 2026 02:18
@HwangRock
Reject control characters at the boundary of the HTTP version token
663bbfd
HttpVersion.valueOf called String.trim() before matching the version,
which strips every character with code point <= 0x20. A boundary control
byte (NUL, CR, LF, VT, FF) on the version token was therefore silently
removed, so a request such as "GET / \x00HTTP/1.1" was decoded as a clean
HTTP/1.1 request. The method token on the same request line already
rejects such a byte since netty#16723, so the two tokens were inconsistent.

Drop the trim() in HttpVersion.valueOf and in the HttpVersion(String,
boolean, boolean) constructor; the existing strict format check now
rejects a token padded with a control byte, and the non-strict path
rejects control/whitespace in the protocol name. RtspVersions.valueOf is
fixed the same way.

Fixes netty#16970
@HwangRock
Merge branch '4.2' into fix-http-version-control-char-trim
c998861
@normanmaurer
normanmaurer requested review from bryce-anderson and chrisvest June 18, 2026 16:21
normanmaurer
normanmaurer requested changes Jun 18, 2026
View reviewed changes
Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java Outdated
channel.writeInbound(singleSp);
HttpRequest req = channel.readInbound();
assertTrue(req.decoderResult().isFailure());
channel.finishAndReleaseAll();

@normanmaurer normanmaurer Jun 18, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert return value

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8b917e5.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@normanmaurer normanmaurer Jun 19, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the return value of finishAndReleaseAll() is not checked

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, missed that — now asserting finishAndReleaseAll() returns false so the test also confirms everything was consumed. Done in a2bc7bc.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took it a step further in 52f8506 — these now reuse the existing testInvalidHeaders0 helper, so they share the same finish() check as the other invalid-request tests (and I dropped the trailing-NUL case since it overlaps with testNulInInitialLine).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java Outdated
channel2.writeInbound(doubleSp);
HttpRequest req2 = channel2.readInbound();
assertTrue(req2.decoderResult().isFailure());
channel2.finishAndReleaseAll();

@normanmaurer normanmaurer Jun 18, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert return value

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8b917e5.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@normanmaurer normanmaurer Jun 19, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the return value of finishAndReleaseAll() is not checked

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here in a2bc7bc.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java Outdated
EmbeddedChannel channel2 = new EmbeddedChannel(new HttpRequestDecoder());
channel2.writeInbound(doubleSp);
HttpRequest req2 = channel2.readInbound();
assertTrue(req2.decoderResult().isFailure());

@normanmaurer normanmaurer Jun 18, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert exception type

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8b917e5.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java Outdated
channel.writeInbound(buf);
HttpRequest req = channel.readInbound();
assertTrue(req.decoderResult().isFailure());
channel.finishAndReleaseAll();

@normanmaurer normanmaurer Jun 18, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comments as above

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8b917e5 — same here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@normanmaurer normanmaurer Jun 19, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the return value of finishAndReleaseAll() is not checked

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too — a2bc7bc.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@normanmaurer normanmaurer added this to the 4.2.16.Final milestone Jun 18, 2026
chrisvest
chrisvest reviewed Jun 18, 2026
View reviewed changes
Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java Outdated
// Regression tests for #16970: a control byte at the version-token boundary used to be silently
// removed by HttpVersion.valueOf()'s String.trim() (which strips every char <= 0x20), so the
// decoder accepted a malformed request as a clean HTTP/1.1 one. The method token was already
// protected by #16723. NUL bytes are written directly to the buffer so the source stays ASCII.

@chrisvest chrisvest Jun 18, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this comment. History belongs in Git, not in comments.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8b917e5 — removed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpVersionParsingTest.java Outdated
// Regression tests for #16970: a boundary control byte on the version token used to be silently
// removed by String.trim() (which strips every char <= 0x20), so a malformed version was accepted
// as a clean one. This is the same request-smuggling class #16723 closed for the method token.
// Control bytes are built with (char) casts so the source stays ASCII-only.

@chrisvest chrisvest Jun 18, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, no need for this comment.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8b917e5 — removed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpVersionParsingTest.java Outdated

@Test
void testLeadingControlCharInStrictValueOfIsRejected() {
// CR, LF, VT and FF were all silently removed by the previous String.trim().

@chrisvest chrisvest Jun 18, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of saying how things used to be, state the behavior we intend: that control characters like those are rejected.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8b917e5 — it now states the intended behavior instead.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpVersionParsingTest.java Outdated

@Test
void testLeadingSpaceInStrictValueOfIsRejected() {
// Previously trim() removed the leading space and "HTTP/1.1" was accepted.

@chrisvest chrisvest Jun 18, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8b917e5 — same here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
HwangRock added 2 commits June 19, 2026 21:02
@HwangRock
Address review feedback on test assertions and comments
8b917e5
Assert the writeInbound return value and that the decoder failure cause
is an IllegalArgumentException in the request-decoder tests, and replace
the history-style comments with statements of the intended behavior.
@HwangRock
Merge remote-tracking branch 'fork/fix-http-version-control-char-trim…
5c9ffa2
…' into fix-http-version-control-char-trim
@HwangRock
HwangRock requested review from chrisvest and normanmaurer June 19, 2026 12:16
normanmaurer
normanmaurer requested changes Jun 19, 2026
View reviewed changes
Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java Outdated
channel.writeInbound(singleSp);
HttpRequest req = channel.readInbound();
assertTrue(req.decoderResult().isFailure());
channel.finishAndReleaseAll();

@normanmaurer normanmaurer Jun 19, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the return value of finishAndReleaseAll() is not checked

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java Outdated
channel2.writeInbound(doubleSp);
HttpRequest req2 = channel2.readInbound();
assertTrue(req2.decoderResult().isFailure());
channel2.finishAndReleaseAll();

@normanmaurer normanmaurer Jun 19, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the return value of finishAndReleaseAll() is not checked

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpRequestDecoderTest.java Outdated
channel.writeInbound(buf);
HttpRequest req = channel.readInbound();
assertTrue(req.decoderResult().isFailure());
channel.finishAndReleaseAll();

@normanmaurer normanmaurer Jun 19, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the return value of finishAndReleaseAll() is not checked

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@HwangRock
Assert finishAndReleaseAll() return value in the version-token tests
a2bc7bc
The new request-decoder tests dropped the boolean returned by
finishAndReleaseAll(); assert it is false so the tests also verify that
every inbound message was consumed and nothing leaked.
@HwangRock
HwangRock requested a review from normanmaurer June 19, 2026 14:38
HwangRock and others added 5 commits June 19, 2026 23:48
@HwangRock
Reuse testInvalidHeaders0 helper for the new invalid-request tests
52f8506
The NUL-in-version and NUL-in-method tests duplicated the existing
testInvalidHeaders0 helper; route them through it so they share the same
finish() check. Drop the trailing-NUL test as it overlaps with
testNulInInitialLine, and assert the LastHttpContent release() return
value in the happy-path test.
@HwangRock
Do not assert release() of the empty last content in the happy-path test
4e46ab9
The LastHttpContent of a bodyless request is the EMPTY_LAST_CONTENT
singleton; its release() is a no-op that returns false, so asserting the
return value is wrong. Just release it.
@HwangRock
Merge branch '4.2' into fix-http-version-control-char-trim
65f0272
@HwangRock
Reword test and RtspVersions comments to describe intended behavior
07640c4
Drop the comments that referred to the previous trim() behavior or
described a mechanism that did not match the code, and remove the
control-character comment from RtspVersions where the rejection is
actually delegated to the HttpVersion constructor.
@HwangRock
Merge remote-tracking branch 'fork/fix-http-version-control-char-trim…
5591236
…' into fix-http-version-control-char-trim
bryce-anderson
bryce-anderson reviewed Jun 22, 2026
View reviewed changes

@bryce-anderson bryce-anderson left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix it self looks good, just a couple very minor nits that I don't feel terribly strongly about.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread codec-http/src/main/java/io/netty/handler/codec/rtsp/RtspVersions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread codec-http/src/test/java/io/netty/handler/codec/http/HttpVersionParsingTest.java Outdated
}

@Test
void testStandardVersionsStillResolveAfterFix() {

@bryce-anderson bryce-anderson Jun 22, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Along the lines of what @chrisvest mentioned, this test name feels it only makes sense in the context of the commit. Can we rename it to make sense all by itself? Maybe testStandardValuesAreSingletons() except the last assert doesn't fit that description...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@HwangRock HwangRock Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. How about testValidVersionsResolveCorrectly? WDYT?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
HwangRock and others added 3 commits June 23, 2026 21:06
@HwangRock @bryce-anderson
Update codec-http/src/main/java/io/netty/handler/codec/rtsp/RtspVersi…
e56e1a1
…ons.java

Co-authored-by: Bryce Anderson <[email protected]>
@HwangRock
Rename the version-resolution test to describe its intent
098aa4e
@HwangRock
Merge remote-tracking branch 'fork/fix-http-version-control-char-trim…
1e2fe3e
…' into fix-http-version-control-char-trim
@HwangRock
HwangRock requested a review from bryce-anderson June 23, 2026 12:16
bryce-anderson
bryce-anderson approved these changes Jun 23, 2026
View reviewed changes
chrisvest
chrisvest approved these changes Jun 23, 2026
View reviewed changes
@chrisvest chrisvest 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 Jun 23, 2026
@chrisvest
chrisvest merged commit 69b7851 into netty:4.2 Jun 23, 2026
22 of 23 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@chrisvest

chrisvest commented Jun 23, 2026

Copy link
Copy Markdown
Member

Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@netty-project-bot

netty-project-bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Could not create auto-port PR.
Got conflicts when cherry-picking onto 4.1.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@netty-project-bot

netty-project-bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Auto-port PR for 5.0: #16981

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@netty-project-bot netty-project-bot mentioned this pull request Jun 23, 2026
Auto-port 5.0: Reject control characters at the boundary of the HTTP version token #16981
Merged
@github-actions github-actions Bot removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Jun 23, 2026
This was referenced Jun 24, 2026
Add directional tests for control characters in the request line apache/pekko-http#1087
Closed
Add directional test for NUL byte in request target apache/pekko-http#1088
Merged
normanmaurer pushed a commit that referenced this pull request Jun 24, 2026
@netty-project-bot @HwangRock
@bryce-anderson @chrisvest
Auto-port 5.0: Reject control characters at the boundary of the HTTP …
87b6af4
…version token (#16981)

Auto-port of #16971 to 5.0
Cherry-picked commit: 69b7851

---
Motivation:

`HttpRequestDecoder` accepts a request whose HTTP-version token carries
a boundary control byte (`NUL`, `CR`, `LF`, `VT`, `FF`, …):

```bash
printf 'GET / \x00HTTP/1.1\r\nHost: localhost\r\n\r\n' | nc <host> <port>
# decoded as a clean HTTP/1.1 request; no decoder failure
```

`HttpVersion.valueOf(String, boolean)` ran `text.trim()` before matching
the version, and `String.trim()` removes every character with code point
`<= 0x20`. The boundary control byte was therefore silently stripped and
the surviving `"HTTP/1.1"` matched the cached constant, so the malformed
request decoded as a clean `HTTP/1.1` one.

The method token on the same request line already rejects such a byte
since #16723 (issue #15047), so the two tokens were inconsistent — this
is the same boundary-control-character / request-smuggling class, left
open for the version token.

Modification:

- `HttpVersion`: drop the `trim()` in `valueOf` and in the
`HttpVersion(String, boolean, boolean)` constructor. The existing strict
format check (`length == 8 && startsWith("HTTP/") && charAt(6) == '.'`)
now rejects a token padded with a control byte, and the non-strict path
rejects control/whitespace in the protocol name via
`hasControlOrWhitespace`. Without the `trim()`, `SP`/`HT` padding is
rejected too, mirroring the method-token behaviour from #16723.
- `RtspVersions.valueOf`: drop the `trim()` the same way.

`HttpRequestDecoder` already turns `createMessage` exceptions into a
decoder failure, so the wire effect is `decoderResult().isSuccess() ==
false` instead of a phantom `HTTP/1.1`.

Result:

Before this change `"GET / \x00HTTP/1.1\r\n…"` decoded successfully
(`decoderResult().isSuccess() == true`, `protocolVersion() ==
HTTP_1_1`); after it the decoder reports a failure, matching the
method-token behaviour. A clean `HTTP/1.1` request still decodes as
before.

```
Test set: io.netty.handler.codec.http.HttpVersionParsingTest
Tests run: 53, Failures: 0, Errors: 0, Skipped: 0
Test set: io.netty.handler.codec.http.HttpRequestDecoderTest
Tests run: 85, Failures: 0, Errors: 0, Skipped: 0
Test set: io.netty.handler.codec.rtsp.RtspDecoderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
Test set: io.netty.handler.codec.rtsp.RtspEncoderTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
```

Fixes #16970

---------

Co-authored-by: HwangRock <[email protected]>
Co-authored-by: Bryce Anderson <[email protected]>
Co-authored-by: Chris Vest <[email protected]>
@normanmaurer

normanmaurer commented Jun 24, 2026

Copy link
Copy Markdown
Member

PR for 4.1 #16986

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrisvest chrisvest removed the needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. label Jun 24, 2026
normanmaurer added a commit that referenced this pull request Jun 26, 2026
@normanmaurer @HwangRock @bryce-anderson
Reject control characters at the boundary of the HTTP version token (#…
df54c37
…16971) (#16986)

Motivation:

`HttpRequestDecoder` accepts a request whose HTTP-version token carries
a boundary control byte (`NUL`, `CR`, `LF`, `VT`, `FF`, …):

```bash
printf 'GET / \x00HTTP/1.1\r\nHost: localhost\r\n\r\n' | nc <host> <port>
```

`HttpVersion.valueOf(String, boolean)` ran `text.trim()` before matching
the version, and `String.trim()` removes every character with code point
`<= 0x20`. The boundary control byte was therefore silently stripped and
the surviving `"HTTP/1.1"` matched the cached constant, so the malformed
request decoded as a clean `HTTP/1.1` one.

The method token on the same request line already rejects such a byte
since #16723 (issue #15047), so the two tokens were inconsistent — this
is the same boundary-control-character / request-smuggling class, left
open for the version token.

Modification:

- `HttpVersion`: drop the `trim()` in `valueOf` and in the
`HttpVersion(String, boolean, boolean)` constructor. The existing strict
format check (`length == 8 && startsWith("HTTP/") && charAt(6) == '.'`)
now rejects a token padded with a control byte, and the non-strict path
rejects control/whitespace in the protocol name via
`hasControlOrWhitespace`. Without the `trim()`, `SP`/`HT` padding is
rejected too, mirroring the method-token behaviour from #16723.
- `RtspVersions.valueOf`: drop the `trim()` the same way.

`HttpRequestDecoder` already turns `createMessage` exceptions into a
decoder failure, so the wire effect is `decoderResult().isSuccess() ==
false` instead of a phantom `HTTP/1.1`.

Result:

Before this change `"GET / \x00HTTP/1.1\r\n…"` decoded successfully
(`decoderResult().isSuccess() == true`, `protocolVersion() ==
HTTP_1_1`); after it the decoder reports a failure, matching the
method-token behaviour. A clean `HTTP/1.1` request still decodes as
before.

```
Test set: io.netty.handler.codec.http.HttpVersionParsingTest
Tests run: 53, Failures: 0, Errors: 0, Skipped: 0
Test set: io.netty.handler.codec.http.HttpRequestDecoderTest
Tests run: 85, Failures: 0, Errors: 0, Skipped: 0
Test set: io.netty.handler.codec.rtsp.RtspDecoderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
Test set: io.netty.handler.codec.rtsp.RtspEncoderTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
```

Fixes #16970

---------

Co-authored-by: Bryce Anderson <[email protected]>

---------

Co-authored-by: HwangRock <[email protected]>
Co-authored-by: Bryce Anderson <[email protected]>
mergify Bot added a commit to ArcadeData/arcadedb that referenced this pull request Jul 8, 2026
@mergify
chore(deps): bump io.netty:netty-all from 4.2.15.Final to 4.2.16.Fina…
ef9c773
…l [skip ci]

Bumps [io.netty:netty-all](https://github.com/netty/netty) from 4.2.15.Final to 4.2.16.Final.
Release notes

*Sourced from [io.netty:netty-all's releases](https://github.com/netty/netty/releases).*

> netty-4.2.16.Final
> ------------------
>
> What's Changed
> --------------
>
> * Document Java 9 requirement for io\_uring by [`@​jchambers`](https://github.com/jchambers) in [netty/netty#16904](https://redirect.github.com/netty/netty/pull/16904)
> * Add BlockHound exception for DnsQueryIdSpace by [`@​violetagg`](https://github.com/violetagg) in [netty/netty#16896](https://redirect.github.com/netty/netty/pull/16896)
> * Fix incorrect bounds in error message of HpackDecoder.setMaxHeaderListSize by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16901](https://redirect.github.com/netty/netty/pull/16901)
> * Add epoch-based chunk cache purge with ring buffer for thread-local reuse by [`@​franz1981`](https://github.com/franz1981) in [netty/netty#16766](https://redirect.github.com/netty/netty/pull/16766)
> * Use Splittable/ThreadLocalRandom to generate bulk data in tests by [`@​chrisvest`](https://github.com/chrisvest) in [netty/netty#16808](https://redirect.github.com/netty/netty/pull/16808)
> * Auto-port 4.2: SingleThreadEventExecutor: document Throwable safety contract on run() by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#16909](https://redirect.github.com/netty/netty/pull/16909)
> * Auto-port 4.2: Make HTTP/2 frame hashCode consistent with equals by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#16910](https://redirect.github.com/netty/netty/pull/16910)
> * Auto-port 4.2: MQTT: Make the decodeProperties early-REPLAY check actually fire by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#16919](https://redirect.github.com/netty/netty/pull/16919)
> * IoUring: fix io\_uring datagram writes with non-zero readerIndex by [`@​dreamlike-ocean`](https://github.com/dreamlike-ocean) in [netty/netty#16905](https://redirect.github.com/netty/netty/pull/16905)
> * Exclude internal events from IoHandler.run() return value in epoll, io\_uring and kqueue by [`@​franz1981`](https://github.com/franz1981) in [netty/netty#16848](https://redirect.github.com/netty/netty/pull/16848)
> * IoUring: Pass IORING\_ENTER\_NO\_IOWAIT to report accurate CPU usage by [`@​wineway`](https://github.com/wineway) in [netty/netty#16739](https://redirect.github.com/netty/netty/pull/16739)
> * Avoid logging exceptions that tests ignore by [`@​chrisvest`](https://github.com/chrisvest) in [netty/netty#16891](https://redirect.github.com/netty/netty/pull/16891)
> * Reject control characters at the boundary of HTTP method names by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16723](https://redirect.github.com/netty/netty/pull/16723)
> * IoUring: fix TCP Fast Open initial writes with readerIndex and composites by [`@​dreamlike-ocean`](https://github.com/dreamlike-ocean) in [netty/netty#16929](https://redirect.github.com/netty/netty/pull/16929)
> * Try to fix/stabilize a number of flaky tests by [`@​chrisvest`](https://github.com/chrisvest) in [netty/netty#16934](https://redirect.github.com/netty/netty/pull/16934)
> * Fix propagation of startTls for client SslContext handlers by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16931](https://redirect.github.com/netty/netty/pull/16931)
> * Update to latest tcnative release by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#16936](https://redirect.github.com/netty/netty/pull/16936)
> * Move test to shared testsuite by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#16928](https://redirect.github.com/netty/netty/pull/16928)
> * [Refactor] Useful helper method getOrDefault & cleaner abstraction by [`@​sanjomo`](https://github.com/sanjomo) in [netty/netty#16927](https://redirect.github.com/netty/netty/pull/16927)
> * Make permessage-deflate server window size and memLevel configurable by [`@​fru1tworld`](https://github.com/fru1tworld) in [netty/netty#16809](https://redirect.github.com/netty/netty/pull/16809)
> * Return early in DnsQueryContext.writeQuery when the query ID space is exhausted by [`@​HwangRock`](https://github.com/HwangRock) in [netty/netty#16950](https://redirect.github.com/netty/netty/pull/16950)
> * Fix HTTP 2 PUSH\_PROMISE stream association validation by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16952](https://redirect.github.com/netty/netty/pull/16952)
> * Fix GZIP FEXTRA extra-field handling in JdkZlibDecoder by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16951](https://redirect.github.com/netty/netty/pull/16951)
> * Http3FrameCodec handle fragmented payloads when skipping unknown frames by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16960](https://redirect.github.com/netty/netty/pull/16960)
> * Add opt-in validation of mandatory pseudo-header fields for HTTP/2 by [`@​hyperxpro`](https://github.com/hyperxpro) in [netty/netty#16932](https://redirect.github.com/netty/netty/pull/16932)
> * Strictly validate MQTT UTF-8 Encoded String by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16939](https://redirect.github.com/netty/netty/pull/16939)
> * Stop DateFormatter trailing token from running past the parse end by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16958](https://redirect.github.com/netty/netty/pull/16958)
> * IpFilter: Deprecate constructor which use accept by default by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#16961](https://redirect.github.com/netty/netty/pull/16961)
> * Add RFC 10008 QUERY Method support by [`@​desiderantes`](https://github.com/desiderantes) in [netty/netty#16966](https://redirect.github.com/netty/netty/pull/16966)
> * Correctly release and fail queued traffic-shaping writes on close by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16959](https://redirect.github.com/netty/netty/pull/16959)
> * Reject control characters at the boundary of the HTTP version token by [`@​HwangRock`](https://github.com/HwangRock) in [netty/netty#16971](https://redirect.github.com/netty/netty/pull/16971)
> * FlowControlHandler: respect auto-read when toggled while dequeueing by [`@​schiemon`](https://github.com/schiemon) in [netty/netty#16949](https://redirect.github.com/netty/netty/pull/16949)
> * Fix leak in ReferenceCountedOpenSslEngine.addCredential by [`@​jmcrawford45`](https://github.com/jmcrawford45) in [netty/netty#16979](https://redirect.github.com/netty/netty/pull/16979)
> * IdleStateHandler: reset firstWriter/ReaderIdleEvent in resetWriteTimeout/resetReadTimeout by [`@​husseinvr97`](https://github.com/husseinvr97) in [netty/netty#16982](https://redirect.github.com/netty/netty/pull/16982)
> * Fix typo in AbstractSniHandler Javadoc by [`@​coderbruis`](https://github.com/coderbruis) in [netty/netty#16988](https://redirect.github.com/netty/netty/pull/16988)
> * Fix client/server inconsistency in SslCredential support matrix by [`@​jmcrawford45`](https://github.com/jmcrawford45) in [netty/netty#16990](https://redirect.github.com/netty/netty/pull/16990)
> * Reconcile `AbstractCoalescingBufferQueue` readableBytes when it drains, and fail stuck HTTP/2 streams instead of spinning empty DATA frames by [`@​gavinbunney`](https://github.com/gavinbunney) in [netty/netty#16947](https://redirect.github.com/netty/netty/pull/16947)
> * Use Ticker in Http2MaxRstFrameListener for testability by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16993](https://redirect.github.com/netty/netty/pull/16993)
> * Reset UTF-8 decode state on CR in StompSubframeDecoder by [`@​vasiliy-mikhailov`](https://github.com/vasiliy-mikhailov) in [netty/netty#16991](https://redirect.github.com/netty/netty/pull/16991)
> * FastLz: Guard decompression against truncated input by [`@​yawkat`](https://github.com/yawkat) in [netty/netty#17000](https://redirect.github.com/netty/netty/pull/17000)
> * Reject non-token characters in HTTP/2 header names by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16762](https://redirect.github.com/netty/netty/pull/16762)
> * Auto-port 4.2: Fix SelfSignCertificate initialization in tests by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#17029](https://redirect.github.com/netty/netty/pull/17029)
> * Enable extension of Http3ClientConnectionHandler to support higher-level protocols such as WebTransport. by [`@​sanjomo`](https://github.com/sanjomo) in [netty/netty#17027](https://redirect.github.com/netty/netty/pull/17027)
> * Implement Adaptive Cumulator by [`@​shivaspeaks`](https://github.com/shivaspeaks) in [netty/netty#16731](https://redirect.github.com/netty/netty/pull/16731)
> * Allow WebSocket extension negotiation to be disabled per response by [`@​mkurz`](https://github.com/mkurz) in [netty/netty#17030](https://redirect.github.com/netty/netty/pull/17030)
> * Support QPACK sensitivity detector for Never Indexed header fields by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#17026](https://redirect.github.com/netty/netty/pull/17026)
> * Fix maxAllocation for brotli-encoded content in HttpContentDecompressor by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#17037](https://redirect.github.com/netty/netty/pull/17037)
> * Pin github actions to reduce risk by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#17043](https://redirect.github.com/netty/netty/pull/17043)

... (truncated)


Commits

* [`3703d79`](netty/netty@3703d79) [maven-release-plugin] prepare release netty-4.2.16.Final
* [`63bbb2c`](netty/netty@63bbb2c) Update rust toolchain - add required parameters
* [`ac06c1b`](netty/netty@ac06c1b) Update rust toolchain
* [`5b68c61`](netty/netty@5b68c61) Merge branches from forks ([#17063](https://redirect.github.com/netty/netty/issues/17063))
* [`de5d276`](netty/netty@de5d276) Update lz4-java to 1.11.1 ([#17061](https://redirect.github.com/netty/netty/issues/17061))
* [`da22048`](netty/netty@da22048) Pin github actions to reduce risk ([#17043](https://redirect.github.com/netty/netty/issues/17043))
* [`0332676`](netty/netty@0332676) Fix maxAllocation for brotli-encoded content in HttpContentDecompressor ([#17037](https://redirect.github.com/netty/netty/issues/17037))
* [`7364401`](netty/netty@7364401) Support QPACK sensitivity detector for Never Indexed header fields ([#17026](https://redirect.github.com/netty/netty/issues/17026))
* [`06faf18`](netty/netty@06faf18) Allow WebSocket extension negotiation to be disabled per response ([#17030](https://redirect.github.com/netty/netty/issues/17030))
* [`bc4b983`](netty/netty@bc4b983) Implement Adaptive Cumulator ([#16731](https://redirect.github.com/netty/netty/issues/16731))
* Additional commits viewable in [compare view](netty/netty@netty-4.2.15.Final...netty-4.2.16.Final)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=io.netty:netty-all&package-manager=maven&previous-version=4.2.15.Final&new-version=4.2.16.Final)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
mergify Bot added a commit to ArcadeData/arcadedb that referenced this pull request Jul 8, 2026
@mergify
chore(deps): bump netty.version from 4.2.15.Final to 4.2.16.Final [sk…
8cd1212
…ip ci]

Bumps `netty.version` from 4.2.15.Final to 4.2.16.Final.
Updates `io.netty:netty-transport` from 4.2.15.Final to 4.2.16.Final
Release notes

*Sourced from [io.netty:netty-transport's releases](https://github.com/netty/netty/releases).*

> netty-4.2.16.Final
> ------------------
>
> What's Changed
> --------------
>
> * Document Java 9 requirement for io\_uring by [`@​jchambers`](https://github.com/jchambers) in [netty/netty#16904](https://redirect.github.com/netty/netty/pull/16904)
> * Add BlockHound exception for DnsQueryIdSpace by [`@​violetagg`](https://github.com/violetagg) in [netty/netty#16896](https://redirect.github.com/netty/netty/pull/16896)
> * Fix incorrect bounds in error message of HpackDecoder.setMaxHeaderListSize by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16901](https://redirect.github.com/netty/netty/pull/16901)
> * Add epoch-based chunk cache purge with ring buffer for thread-local reuse by [`@​franz1981`](https://github.com/franz1981) in [netty/netty#16766](https://redirect.github.com/netty/netty/pull/16766)
> * Use Splittable/ThreadLocalRandom to generate bulk data in tests by [`@​chrisvest`](https://github.com/chrisvest) in [netty/netty#16808](https://redirect.github.com/netty/netty/pull/16808)
> * Auto-port 4.2: SingleThreadEventExecutor: document Throwable safety contract on run() by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#16909](https://redirect.github.com/netty/netty/pull/16909)
> * Auto-port 4.2: Make HTTP/2 frame hashCode consistent with equals by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#16910](https://redirect.github.com/netty/netty/pull/16910)
> * Auto-port 4.2: MQTT: Make the decodeProperties early-REPLAY check actually fire by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#16919](https://redirect.github.com/netty/netty/pull/16919)
> * IoUring: fix io\_uring datagram writes with non-zero readerIndex by [`@​dreamlike-ocean`](https://github.com/dreamlike-ocean) in [netty/netty#16905](https://redirect.github.com/netty/netty/pull/16905)
> * Exclude internal events from IoHandler.run() return value in epoll, io\_uring and kqueue by [`@​franz1981`](https://github.com/franz1981) in [netty/netty#16848](https://redirect.github.com/netty/netty/pull/16848)
> * IoUring: Pass IORING\_ENTER\_NO\_IOWAIT to report accurate CPU usage by [`@​wineway`](https://github.com/wineway) in [netty/netty#16739](https://redirect.github.com/netty/netty/pull/16739)
> * Avoid logging exceptions that tests ignore by [`@​chrisvest`](https://github.com/chrisvest) in [netty/netty#16891](https://redirect.github.com/netty/netty/pull/16891)
> * Reject control characters at the boundary of HTTP method names by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16723](https://redirect.github.com/netty/netty/pull/16723)
> * IoUring: fix TCP Fast Open initial writes with readerIndex and composites by [`@​dreamlike-ocean`](https://github.com/dreamlike-ocean) in [netty/netty#16929](https://redirect.github.com/netty/netty/pull/16929)
> * Try to fix/stabilize a number of flaky tests by [`@​chrisvest`](https://github.com/chrisvest) in [netty/netty#16934](https://redirect.github.com/netty/netty/pull/16934)
> * Fix propagation of startTls for client SslContext handlers by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16931](https://redirect.github.com/netty/netty/pull/16931)
> * Update to latest tcnative release by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#16936](https://redirect.github.com/netty/netty/pull/16936)
> * Move test to shared testsuite by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#16928](https://redirect.github.com/netty/netty/pull/16928)
> * [Refactor] Useful helper method getOrDefault & cleaner abstraction by [`@​sanjomo`](https://github.com/sanjomo) in [netty/netty#16927](https://redirect.github.com/netty/netty/pull/16927)
> * Make permessage-deflate server window size and memLevel configurable by [`@​fru1tworld`](https://github.com/fru1tworld) in [netty/netty#16809](https://redirect.github.com/netty/netty/pull/16809)
> * Return early in DnsQueryContext.writeQuery when the query ID space is exhausted by [`@​HwangRock`](https://github.com/HwangRock) in [netty/netty#16950](https://redirect.github.com/netty/netty/pull/16950)
> * Fix HTTP 2 PUSH\_PROMISE stream association validation by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16952](https://redirect.github.com/netty/netty/pull/16952)
> * Fix GZIP FEXTRA extra-field handling in JdkZlibDecoder by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16951](https://redirect.github.com/netty/netty/pull/16951)
> * Http3FrameCodec handle fragmented payloads when skipping unknown frames by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16960](https://redirect.github.com/netty/netty/pull/16960)
> * Add opt-in validation of mandatory pseudo-header fields for HTTP/2 by [`@​hyperxpro`](https://github.com/hyperxpro) in [netty/netty#16932](https://redirect.github.com/netty/netty/pull/16932)
> * Strictly validate MQTT UTF-8 Encoded String by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16939](https://redirect.github.com/netty/netty/pull/16939)
> * Stop DateFormatter trailing token from running past the parse end by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16958](https://redirect.github.com/netty/netty/pull/16958)
> * IpFilter: Deprecate constructor which use accept by default by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#16961](https://redirect.github.com/netty/netty/pull/16961)
> * Add RFC 10008 QUERY Method support by [`@​desiderantes`](https://github.com/desiderantes) in [netty/netty#16966](https://redirect.github.com/netty/netty/pull/16966)
> * Correctly release and fail queued traffic-shaping writes on close by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16959](https://redirect.github.com/netty/netty/pull/16959)
> * Reject control characters at the boundary of the HTTP version token by [`@​HwangRock`](https://github.com/HwangRock) in [netty/netty#16971](https://redirect.github.com/netty/netty/pull/16971)
> * FlowControlHandler: respect auto-read when toggled while dequeueing by [`@​schiemon`](https://github.com/schiemon) in [netty/netty#16949](https://redirect.github.com/netty/netty/pull/16949)
> * Fix leak in ReferenceCountedOpenSslEngine.addCredential by [`@​jmcrawford45`](https://github.com/jmcrawford45) in [netty/netty#16979](https://redirect.github.com/netty/netty/pull/16979)
> * IdleStateHandler: reset firstWriter/ReaderIdleEvent in resetWriteTimeout/resetReadTimeout by [`@​husseinvr97`](https://github.com/husseinvr97) in [netty/netty#16982](https://redirect.github.com/netty/netty/pull/16982)
> * Fix typo in AbstractSniHandler Javadoc by [`@​coderbruis`](https://github.com/coderbruis) in [netty/netty#16988](https://redirect.github.com/netty/netty/pull/16988)
> * Fix client/server inconsistency in SslCredential support matrix by [`@​jmcrawford45`](https://github.com/jmcrawford45) in [netty/netty#16990](https://redirect.github.com/netty/netty/pull/16990)
> * Reconcile `AbstractCoalescingBufferQueue` readableBytes when it drains, and fail stuck HTTP/2 streams instead of spinning empty DATA frames by [`@​gavinbunney`](https://github.com/gavinbunney) in [netty/netty#16947](https://redirect.github.com/netty/netty/pull/16947)
> * Use Ticker in Http2MaxRstFrameListener for testability by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16993](https://redirect.github.com/netty/netty/pull/16993)
> * Reset UTF-8 decode state on CR in StompSubframeDecoder by [`@​vasiliy-mikhailov`](https://github.com/vasiliy-mikhailov) in [netty/netty#16991](https://redirect.github.com/netty/netty/pull/16991)
> * FastLz: Guard decompression against truncated input by [`@​yawkat`](https://github.com/yawkat) in [netty/netty#17000](https://redirect.github.com/netty/netty/pull/17000)
> * Reject non-token characters in HTTP/2 header names by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16762](https://redirect.github.com/netty/netty/pull/16762)
> * Auto-port 4.2: Fix SelfSignCertificate initialization in tests by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#17029](https://redirect.github.com/netty/netty/pull/17029)
> * Enable extension of Http3ClientConnectionHandler to support higher-level protocols such as WebTransport. by [`@​sanjomo`](https://github.com/sanjomo) in [netty/netty#17027](https://redirect.github.com/netty/netty/pull/17027)
> * Implement Adaptive Cumulator by [`@​shivaspeaks`](https://github.com/shivaspeaks) in [netty/netty#16731](https://redirect.github.com/netty/netty/pull/16731)
> * Allow WebSocket extension negotiation to be disabled per response by [`@​mkurz`](https://github.com/mkurz) in [netty/netty#17030](https://redirect.github.com/netty/netty/pull/17030)
> * Support QPACK sensitivity detector for Never Indexed header fields by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#17026](https://redirect.github.com/netty/netty/pull/17026)
> * Fix maxAllocation for brotli-encoded content in HttpContentDecompressor by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#17037](https://redirect.github.com/netty/netty/pull/17037)
> * Pin github actions to reduce risk by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#17043](https://redirect.github.com/netty/netty/pull/17043)

... (truncated)


Commits

* [`3703d79`](netty/netty@3703d79) [maven-release-plugin] prepare release netty-4.2.16.Final
* [`63bbb2c`](netty/netty@63bbb2c) Update rust toolchain - add required parameters
* [`ac06c1b`](netty/netty@ac06c1b) Update rust toolchain
* [`5b68c61`](netty/netty@5b68c61) Merge branches from forks ([#17063](https://redirect.github.com/netty/netty/issues/17063))
* [`de5d276`](netty/netty@de5d276) Update lz4-java to 1.11.1 ([#17061](https://redirect.github.com/netty/netty/issues/17061))
* [`da22048`](netty/netty@da22048) Pin github actions to reduce risk ([#17043](https://redirect.github.com/netty/netty/issues/17043))
* [`0332676`](netty/netty@0332676) Fix maxAllocation for brotli-encoded content in HttpContentDecompressor ([#17037](https://redirect.github.com/netty/netty/issues/17037))
* [`7364401`](netty/netty@7364401) Support QPACK sensitivity detector for Never Indexed header fields ([#17026](https://redirect.github.com/netty/netty/issues/17026))
* [`06faf18`](netty/netty@06faf18) Allow WebSocket extension negotiation to be disabled per response ([#17030](https://redirect.github.com/netty/netty/issues/17030))
* [`bc4b983`](netty/netty@bc4b983) Implement Adaptive Cumulator ([#16731](https://redirect.github.com/netty/netty/issues/16731))
* Additional commits viewable in [compare view](netty/netty@netty-4.2.15.Final...netty-4.2.16.Final)
  
Updates `io.netty:netty-codec` from 4.2.15.Final to 4.2.16.Final
Release notes

*Sourced from [io.netty:netty-codec's releases](https://github.com/netty/netty/releases).*

> netty-4.2.16.Final
> ------------------
>
> What's Changed
> --------------
>
> * Document Java 9 requirement for io\_uring by [`@​jchambers`](https://github.com/jchambers) in [netty/netty#16904](https://redirect.github.com/netty/netty/pull/16904)
> * Add BlockHound exception for DnsQueryIdSpace by [`@​violetagg`](https://github.com/violetagg) in [netty/netty#16896](https://redirect.github.com/netty/netty/pull/16896)
> * Fix incorrect bounds in error message of HpackDecoder.setMaxHeaderListSize by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16901](https://redirect.github.com/netty/netty/pull/16901)
> * Add epoch-based chunk cache purge with ring buffer for thread-local reuse by [`@​franz1981`](https://github.com/franz1981) in [netty/netty#16766](https://redirect.github.com/netty/netty/pull/16766)
> * Use Splittable/ThreadLocalRandom to generate bulk data in tests by [`@​chrisvest`](https://github.com/chrisvest) in [netty/netty#16808](https://redirect.github.com/netty/netty/pull/16808)
> * Auto-port 4.2: SingleThreadEventExecutor: document Throwable safety contract on run() by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#16909](https://redirect.github.com/netty/netty/pull/16909)
> * Auto-port 4.2: Make HTTP/2 frame hashCode consistent with equals by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#16910](https://redirect.github.com/netty/netty/pull/16910)
> * Auto-port 4.2: MQTT: Make the decodeProperties early-REPLAY check actually fire by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#16919](https://redirect.github.com/netty/netty/pull/16919)
> * IoUring: fix io\_uring datagram writes with non-zero readerIndex by [`@​dreamlike-ocean`](https://github.com/dreamlike-ocean) in [netty/netty#16905](https://redirect.github.com/netty/netty/pull/16905)
> * Exclude internal events from IoHandler.run() return value in epoll, io\_uring and kqueue by [`@​franz1981`](https://github.com/franz1981) in [netty/netty#16848](https://redirect.github.com/netty/netty/pull/16848)
> * IoUring: Pass IORING\_ENTER\_NO\_IOWAIT to report accurate CPU usage by [`@​wineway`](https://github.com/wineway) in [netty/netty#16739](https://redirect.github.com/netty/netty/pull/16739)
> * Avoid logging exceptions that tests ignore by [`@​chrisvest`](https://github.com/chrisvest) in [netty/netty#16891](https://redirect.github.com/netty/netty/pull/16891)
> * Reject control characters at the boundary of HTTP method names by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16723](https://redirect.github.com/netty/netty/pull/16723)
> * IoUring: fix TCP Fast Open initial writes with readerIndex and composites by [`@​dreamlike-ocean`](https://github.com/dreamlike-ocean) in [netty/netty#16929](https://redirect.github.com/netty/netty/pull/16929)
> * Try to fix/stabilize a number of flaky tests by [`@​chrisvest`](https://github.com/chrisvest) in [netty/netty#16934](https://redirect.github.com/netty/netty/pull/16934)
> * Fix propagation of startTls for client SslContext handlers by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16931](https://redirect.github.com/netty/netty/pull/16931)
> * Update to latest tcnative release by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#16936](https://redirect.github.com/netty/netty/pull/16936)
> * Move test to shared testsuite by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#16928](https://redirect.github.com/netty/netty/pull/16928)
> * [Refactor] Useful helper method getOrDefault & cleaner abstraction by [`@​sanjomo`](https://github.com/sanjomo) in [netty/netty#16927](https://redirect.github.com/netty/netty/pull/16927)
> * Make permessage-deflate server window size and memLevel configurable by [`@​fru1tworld`](https://github.com/fru1tworld) in [netty/netty#16809](https://redirect.github.com/netty/netty/pull/16809)
> * Return early in DnsQueryContext.writeQuery when the query ID space is exhausted by [`@​HwangRock`](https://github.com/HwangRock) in [netty/netty#16950](https://redirect.github.com/netty/netty/pull/16950)
> * Fix HTTP 2 PUSH\_PROMISE stream association validation by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16952](https://redirect.github.com/netty/netty/pull/16952)
> * Fix GZIP FEXTRA extra-field handling in JdkZlibDecoder by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16951](https://redirect.github.com/netty/netty/pull/16951)
> * Http3FrameCodec handle fragmented payloads when skipping unknown frames by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16960](https://redirect.github.com/netty/netty/pull/16960)
> * Add opt-in validation of mandatory pseudo-header fields for HTTP/2 by [`@​hyperxpro`](https://github.com/hyperxpro) in [netty/netty#16932](https://redirect.github.com/netty/netty/pull/16932)
> * Strictly validate MQTT UTF-8 Encoded String by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16939](https://redirect.github.com/netty/netty/pull/16939)
> * Stop DateFormatter trailing token from running past the parse end by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16958](https://redirect.github.com/netty/netty/pull/16958)
> * IpFilter: Deprecate constructor which use accept by default by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#16961](https://redirect.github.com/netty/netty/pull/16961)
> * Add RFC 10008 QUERY Method support by [`@​desiderantes`](https://github.com/desiderantes) in [netty/netty#16966](https://redirect.github.com/netty/netty/pull/16966)
> * Correctly release and fail queued traffic-shaping writes on close by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16959](https://redirect.github.com/netty/netty/pull/16959)
> * Reject control characters at the boundary of the HTTP version token by [`@​HwangRock`](https://github.com/HwangRock) in [netty/netty#16971](https://redirect.github.com/netty/netty/pull/16971)
> * FlowControlHandler: respect auto-read when toggled while dequeueing by [`@​schiemon`](https://github.com/schiemon) in [netty/netty#16949](https://redirect.github.com/netty/netty/pull/16949)
> * Fix leak in ReferenceCountedOpenSslEngine.addCredential by [`@​jmcrawford45`](https://github.com/jmcrawford45) in [netty/netty#16979](https://redirect.github.com/netty/netty/pull/16979)
> * IdleStateHandler: reset firstWriter/ReaderIdleEvent in resetWriteTimeout/resetReadTimeout by [`@​husseinvr97`](https://github.com/husseinvr97) in [netty/netty#16982](https://redirect.github.com/netty/netty/pull/16982)
> * Fix typo in AbstractSniHandler Javadoc by [`@​coderbruis`](https://github.com/coderbruis) in [netty/netty#16988](https://redirect.github.com/netty/netty/pull/16988)
> * Fix client/server inconsistency in SslCredential support matrix by [`@​jmcrawford45`](https://github.com/jmcrawford45) in [netty/netty#16990](https://redirect.github.com/netty/netty/pull/16990)
> * Reconcile `AbstractCoalescingBufferQueue` readableBytes when it drains, and fail stuck HTTP/2 streams instead of spinning empty DATA frames by [`@​gavinbunney`](https://github.com/gavinbunney) in [netty/netty#16947](https://redirect.github.com/netty/netty/pull/16947)
> * Use Ticker in Http2MaxRstFrameListener for testability by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16993](https://redirect.github.com/netty/netty/pull/16993)
> * Reset UTF-8 decode state on CR in StompSubframeDecoder by [`@​vasiliy-mikhailov`](https://github.com/vasiliy-mikhailov) in [netty/netty#16991](https://redirect.github.com/netty/netty/pull/16991)
> * FastLz: Guard decompression against truncated input by [`@​yawkat`](https://github.com/yawkat) in [netty/netty#17000](https://redirect.github.com/netty/netty/pull/17000)
> * Reject non-token characters in HTTP/2 header names by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16762](https://redirect.github.com/netty/netty/pull/16762)
> * Auto-port 4.2: Fix SelfSignCertificate initialization in tests by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#17029](https://redirect.github.com/netty/netty/pull/17029)
> * Enable extension of Http3ClientConnectionHandler to support higher-level protocols such as WebTransport. by [`@​sanjomo`](https://github.com/sanjomo) in [netty/netty#17027](https://redirect.github.com/netty/netty/pull/17027)
> * Implement Adaptive Cumulator by [`@​shivaspeaks`](https://github.com/shivaspeaks) in [netty/netty#16731](https://redirect.github.com/netty/netty/pull/16731)
> * Allow WebSocket extension negotiation to be disabled per response by [`@​mkurz`](https://github.com/mkurz) in [netty/netty#17030](https://redirect.github.com/netty/netty/pull/17030)
> * Support QPACK sensitivity detector for Never Indexed header fields by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#17026](https://redirect.github.com/netty/netty/pull/17026)
> * Fix maxAllocation for brotli-encoded content in HttpContentDecompressor by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#17037](https://redirect.github.com/netty/netty/pull/17037)
> * Pin github actions to reduce risk by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#17043](https://redirect.github.com/netty/netty/pull/17043)

... (truncated)


Commits

* [`3703d79`](netty/netty@3703d79) [maven-release-plugin] prepare release netty-4.2.16.Final
* [`63bbb2c`](netty/netty@63bbb2c) Update rust toolchain - add required parameters
* [`ac06c1b`](netty/netty@ac06c1b) Update rust toolchain
* [`5b68c61`](netty/netty@5b68c61) Merge branches from forks ([#17063](https://redirect.github.com/netty/netty/issues/17063))
* [`de5d276`](netty/netty@de5d276) Update lz4-java to 1.11.1 ([#17061](https://redirect.github.com/netty/netty/issues/17061))
* [`da22048`](netty/netty@da22048) Pin github actions to reduce risk ([#17043](https://redirect.github.com/netty/netty/issues/17043))
* [`0332676`](netty/netty@0332676) Fix maxAllocation for brotli-encoded content in HttpContentDecompressor ([#17037](https://redirect.github.com/netty/netty/issues/17037))
* [`7364401`](netty/netty@7364401) Support QPACK sensitivity detector for Never Indexed header fields ([#17026](https://redirect.github.com/netty/netty/issues/17026))
* [`06faf18`](netty/netty@06faf18) Allow WebSocket extension negotiation to be disabled per response ([#17030](https://redirect.github.com/netty/netty/issues/17030))
* [`bc4b983`](netty/netty@bc4b983) Implement Adaptive Cumulator ([#16731](https://redirect.github.com/netty/netty/issues/16731))
* Additional commits viewable in [compare view](netty/netty@netty-4.2.15.Final...netty-4.2.16.Final)
  
Updates `io.netty:netty-handler` from 4.2.15.Final to 4.2.16.Final
Release notes

*Sourced from [io.netty:netty-handler's releases](https://github.com/netty/netty/releases).*

> netty-4.2.16.Final
> ------------------
>
> What's Changed
> --------------
>
> * Document Java 9 requirement for io\_uring by [`@​jchambers`](https://github.com/jchambers) in [netty/netty#16904](https://redirect.github.com/netty/netty/pull/16904)
> * Add BlockHound exception for DnsQueryIdSpace by [`@​violetagg`](https://github.com/violetagg) in [netty/netty#16896](https://redirect.github.com/netty/netty/pull/16896)
> * Fix incorrect bounds in error message of HpackDecoder.setMaxHeaderListSize by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16901](https://redirect.github.com/netty/netty/pull/16901)
> * Add epoch-based chunk cache purge with ring buffer for thread-local reuse by [`@​franz1981`](https://github.com/franz1981) in [netty/netty#16766](https://redirect.github.com/netty/netty/pull/16766)
> * Use Splittable/ThreadLocalRandom to generate bulk data in tests by [`@​chrisvest`](https://github.com/chrisvest) in [netty/netty#16808](https://redirect.github.com/netty/netty/pull/16808)
> * Auto-port 4.2: SingleThreadEventExecutor: document Throwable safety contract on run() by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#16909](https://redirect.github.com/netty/netty/pull/16909)
> * Auto-port 4.2: Make HTTP/2 frame hashCode consistent with equals by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#16910](https://redirect.github.com/netty/netty/pull/16910)
> * Auto-port 4.2: MQTT: Make the decodeProperties early-REPLAY check actually fire by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#16919](https://redirect.github.com/netty/netty/pull/16919)
> * IoUring: fix io\_uring datagram writes with non-zero readerIndex by [`@​dreamlike-ocean`](https://github.com/dreamlike-ocean) in [netty/netty#16905](https://redirect.github.com/netty/netty/pull/16905)
> * Exclude internal events from IoHandler.run() return value in epoll, io\_uring and kqueue by [`@​franz1981`](https://github.com/franz1981) in [netty/netty#16848](https://redirect.github.com/netty/netty/pull/16848)
> * IoUring: Pass IORING\_ENTER\_NO\_IOWAIT to report accurate CPU usage by [`@​wineway`](https://github.com/wineway) in [netty/netty#16739](https://redirect.github.com/netty/netty/pull/16739)
> * Avoid logging exceptions that tests ignore by [`@​chrisvest`](https://github.com/chrisvest) in [netty/netty#16891](https://redirect.github.com/netty/netty/pull/16891)
> * Reject control characters at the boundary of HTTP method names by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16723](https://redirect.github.com/netty/netty/pull/16723)
> * IoUring: fix TCP Fast Open initial writes with readerIndex and composites by [`@​dreamlike-ocean`](https://github.com/dreamlike-ocean) in [netty/netty#16929](https://redirect.github.com/netty/netty/pull/16929)
> * Try to fix/stabilize a number of flaky tests by [`@​chrisvest`](https://github.com/chrisvest) in [netty/netty#16934](https://redirect.github.com/netty/netty/pull/16934)
> * Fix propagation of startTls for client SslContext handlers by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16931](https://redirect.github.com/netty/netty/pull/16931)
> * Update to latest tcnative release by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#16936](https://redirect.github.com/netty/netty/pull/16936)
> * Move test to shared testsuite by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#16928](https://redirect.github.com/netty/netty/pull/16928)
> * [Refactor] Useful helper method getOrDefault & cleaner abstraction by [`@​sanjomo`](https://github.com/sanjomo) in [netty/netty#16927](https://redirect.github.com/netty/netty/pull/16927)
> * Make permessage-deflate server window size and memLevel configurable by [`@​fru1tworld`](https://github.com/fru1tworld) in [netty/netty#16809](https://redirect.github.com/netty/netty/pull/16809)
> * Return early in DnsQueryContext.writeQuery when the query ID space is exhausted by [`@​HwangRock`](https://github.com/HwangRock) in [netty/netty#16950](https://redirect.github.com/netty/netty/pull/16950)
> * Fix HTTP 2 PUSH\_PROMISE stream association validation by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16952](https://redirect.github.com/netty/netty/pull/16952)
> * Fix GZIP FEXTRA extra-field handling in JdkZlibDecoder by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16951](https://redirect.github.com/netty/netty/pull/16951)
> * Http3FrameCodec handle fragmented payloads when skipping unknown frames by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16960](https://redirect.github.com/netty/netty/pull/16960)
> * Add opt-in validation of mandatory pseudo-header fields for HTTP/2 by [`@​hyperxpro`](https://github.com/hyperxpro) in [netty/netty#16932](https://redirect.github.com/netty/netty/pull/16932)
> * Strictly validate MQTT UTF-8 Encoded String by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16939](https://redirect.github.com/netty/netty/pull/16939)
> * Stop DateFormatter trailing token from running past the parse end by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16958](https://redirect.github.com/netty/netty/pull/16958)
> * IpFilter: Deprecate constructor which use accept by default by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#16961](https://redirect.github.com/netty/netty/pull/16961)
> * Add RFC 10008 QUERY Method support by [`@​desiderantes`](https://github.com/desiderantes) in [netty/netty#16966](https://redirect.github.com/netty/netty/pull/16966)
> * Correctly release and fail queued traffic-shaping writes on close by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16959](https://redirect.github.com/netty/netty/pull/16959)
> * Reject control characters at the boundary of the HTTP version token by [`@​HwangRock`](https://github.com/HwangRock) in [netty/netty#16971](https://redirect.github.com/netty/netty/pull/16971)
> * FlowControlHandler: respect auto-read when toggled while dequeueing by [`@​schiemon`](https://github.com/schiemon) in [netty/netty#16949](https://redirect.github.com/netty/netty/pull/16949)
> * Fix leak in ReferenceCountedOpenSslEngine.addCredential by [`@​jmcrawford45`](https://github.com/jmcrawford45) in [netty/netty#16979](https://redirect.github.com/netty/netty/pull/16979)
> * IdleStateHandler: reset firstWriter/ReaderIdleEvent in resetWriteTimeout/resetReadTimeout by [`@​husseinvr97`](https://github.com/husseinvr97) in [netty/netty#16982](https://redirect.github.com/netty/netty/pull/16982)
> * Fix typo in AbstractSniHandler Javadoc by [`@​coderbruis`](https://github.com/coderbruis) in [netty/netty#16988](https://redirect.github.com/netty/netty/pull/16988)
> * Fix client/server inconsistency in SslCredential support matrix by [`@​jmcrawford45`](https://github.com/jmcrawford45) in [netty/netty#16990](https://redirect.github.com/netty/netty/pull/16990)
> * Reconcile `AbstractCoalescingBufferQueue` readableBytes when it drains, and fail stuck HTTP/2 streams instead of spinning empty DATA frames by [`@​gavinbunney`](https://github.com/gavinbunney) in [netty/netty#16947](https://redirect.github.com/netty/netty/pull/16947)
> * Use Ticker in Http2MaxRstFrameListener for testability by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#16993](https://redirect.github.com/netty/netty/pull/16993)
> * Reset UTF-8 decode state on CR in StompSubframeDecoder by [`@​vasiliy-mikhailov`](https://github.com/vasiliy-mikhailov) in [netty/netty#16991](https://redirect.github.com/netty/netty/pull/16991)
> * FastLz: Guard decompression against truncated input by [`@​yawkat`](https://github.com/yawkat) in [netty/netty#17000](https://redirect.github.com/netty/netty/pull/17000)
> * Reject non-token characters in HTTP/2 header names by [`@​daguimu`](https://github.com/daguimu) in [netty/netty#16762](https://redirect.github.com/netty/netty/pull/16762)
> * Auto-port 4.2: Fix SelfSignCertificate initialization in tests by [`@​netty-project-bot`](https://github.com/netty-project-bot) in [netty/netty#17029](https://redirect.github.com/netty/netty/pull/17029)
> * Enable extension of Http3ClientConnectionHandler to support higher-level protocols such as WebTransport. by [`@​sanjomo`](https://github.com/sanjomo) in [netty/netty#17027](https://redirect.github.com/netty/netty/pull/17027)
> * Implement Adaptive Cumulator by [`@​shivaspeaks`](https://github.com/shivaspeaks) in [netty/netty#16731](https://redirect.github.com/netty/netty/pull/16731)
> * Allow WebSocket extension negotiation to be disabled per response by [`@​mkurz`](https://github.com/mkurz) in [netty/netty#17030](https://redirect.github.com/netty/netty/pull/17030)
> * Support QPACK sensitivity detector for Never Indexed header fields by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#17026](https://redirect.github.com/netty/netty/pull/17026)
> * Fix maxAllocation for brotli-encoded content in HttpContentDecompressor by [`@​skyguard1`](https://github.com/skyguard1) in [netty/netty#17037](https://redirect.github.com/netty/netty/pull/17037)
> * Pin github actions to reduce risk by [`@​normanmaurer`](https://github.com/normanmaurer) in [netty/netty#17043](https://redirect.github.com/netty/netty/pull/17043)

... (truncated)


Commits

* [`3703d79`](netty/netty@3703d79) [maven-release-plugin] prepare release netty-4.2.16.Final
* [`63bbb2c`](netty/netty@63bbb2c) Update rust toolchain - add required parameters
* [`ac06c1b`](netty/netty@ac06c1b) Update rust toolchain
* [`5b68c61`](netty/netty@5b68c61) Merge branches from forks ([#17063](https://redirect.github.com/netty/netty/issues/17063))
* [`de5d276`](netty/netty@de5d276) Update lz4-java to 1.11.1 ([#17061](https://redirect.github.com/netty/netty/issues/17061))
* [`da22048`](netty/netty@da22048) Pin github actions to reduce risk ([#17043](https://redirect.github.com/netty/netty/issues/17043))
* [`0332676`](netty/netty@0332676) Fix maxAllocation for brotli-encoded content in HttpContentDecompressor ([#17037](https://redirect.github.com/netty/netty/issues/17037))
* [`7364401`](netty/netty@7364401) Support QPACK sensitivity detector for Never Indexed header fields ([#17026](https://redirect.github.com/netty/netty/issues/17026))
* [`06faf18`](netty/netty@06faf18) Allow WebSocket extension negotiation to be disabled per response ([#17030](https://redirect.github.com/netty/netty/issues/17030))
* [`bc4b983`](netty/netty@bc4b983) Implement Adaptive Cumulator ([#16731](https://redirect.github.com/netty/netty/issues/16731))
* Additional commits viewable in [compare view](netty/netty@netty-4.2.15.Final...netty-4.2.16.Final)
  
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
@dongjoon-hyun dongjoon-hyun mentioned this pull request Jul 8, 2026
[SPARK-58039] Upgrade Netty to 4.2.16.Final apache/spark-kubernetes-operator#750
Closed
@coderabbitai coderabbitai Bot mentioned this pull request Aug 3, 2026
Use Netty's HttpServerCodec instead of the forked one line/armeria#6896
Merged
@normanmaurer normanmaurer mentioned this pull request Oct 1, 2026
child5 #17695
Closed
lltopk pushed a commit to lltopk/netty that referenced this pull request Oct 24, 2026
@normanmaurer @HwangRock
@bryce-anderson @lltopk
Reject control characters at the boundary of the HTTP version token (n…
9d54b1a
…etty#16971) (netty#16986)

Motivation:

`HttpRequestDecoder` accepts a request whose HTTP-version token carries
a boundary control byte (`NUL`, `CR`, `LF`, `VT`, `FF`, …):

```bash
printf 'GET / \x00HTTP/1.1\r\nHost: localhost\r\n\r\n' | nc <host> <port>
```

`HttpVersion.valueOf(String, boolean)` ran `text.trim()` before matching
the version, and `String.trim()` removes every character with code point
`<= 0x20`. The boundary control byte was therefore silently stripped and
the surviving `"HTTP/1.1"` matched the cached constant, so the malformed
request decoded as a clean `HTTP/1.1` one.

The method token on the same request line already rejects such a byte
since netty#16723 (issue netty#15047), so the two tokens were inconsistent — this
is the same boundary-control-character / request-smuggling class, left
open for the version token.

Modification:

- `HttpVersion`: drop the `trim()` in `valueOf` and in the
`HttpVersion(String, boolean, boolean)` constructor. The existing strict
format check (`length == 8 && startsWith("HTTP/") && charAt(6) == '.'`)
now rejects a token padded with a control byte, and the non-strict path
rejects control/whitespace in the protocol name via
`hasControlOrWhitespace`. Without the `trim()`, `SP`/`HT` padding is
rejected too, mirroring the method-token behaviour from netty#16723.
- `RtspVersions.valueOf`: drop the `trim()` the same way.

`HttpRequestDecoder` already turns `createMessage` exceptions into a
decoder failure, so the wire effect is `decoderResult().isSuccess() ==
false` instead of a phantom `HTTP/1.1`.

Result:

Before this change `"GET / \x00HTTP/1.1\r\n…"` decoded successfully
(`decoderResult().isSuccess() == true`, `protocolVersion() ==
HTTP_1_1`); after it the decoder reports a failure, matching the
method-token behaviour. A clean `HTTP/1.1` request still decodes as
before.

```
Test set: io.netty.handler.codec.http.HttpVersionParsingTest
Tests run: 53, Failures: 0, Errors: 0, Skipped: 0
Test set: io.netty.handler.codec.http.HttpRequestDecoderTest
Tests run: 85, Failures: 0, Errors: 0, Skipped: 0
Test set: io.netty.handler.codec.rtsp.RtspDecoderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
Test set: io.netty.handler.codec.rtsp.RtspEncoderTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
```

Fixes netty#16970

---------

Co-authored-by: Bryce Anderson <[email protected]>

---------

Co-authored-by: HwangRock <[email protected]>
Co-authored-by: Bryce Anderson <[email protected]>
@normanmaurer normanmaurer mentioned this pull request Oct 26, 2026
crisp nova cceda091 #18109
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chrisvest chrisvest chrisvest approved these changes
@bryce-anderson bryce-anderson bryce-anderson approved these changes
@normanmaurer normanmaurer Awaiting requested review from normanmaurer

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.2.16.Final

Development

Successfully merging this pull request may close these issues.

HttpRequestDecoder silently accepts control characters in the HTTP version token

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@HwangRock @chrisvest @netty-project-bot @normanmaurer @bryce-anderson
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.