Repository navigation
Replace Jetty with Netty in the core connectors (3.0 milestone 2) - #1537
Merged
Merged
Conversation
The "war" scheme (Web Archive Access Protocol) was a leftover of the Servlet
mode, which is no longer supported. Protocol.valueOf("war") now returns a new,
unknown protocol. The SpringContext Javadoc example uses a CLAP reference
instead.
Signed-off-by: Jerome Louvel <374450+jlouvel@users.noreply.github.com>
The HTTP/HTTPS server and client connectors of the core now rely on Netty 4.2
instead of Jetty 12, keeping the connector class names (HttpServerHelper,
HttpsServerHelper, HttpClientHelper). No Netty type is exposed by the public
API.
- Java 25 is the minimum version, in the build and the CI workflows.
- Server calls run on virtual threads by default ("threadPool.virtual").
- HTTP/1.1, HTTP/2 (ALPN, h2c upgrade and prior knowledge) and back-pressure on
reads and writes; "server.maxConcurrentCalls" answers 503 above its limit.
- Client: per-origin connection pool, shared HTTP/2 connections, proxy support
(absolute URIs and CONNECT), gzip decoding, host name verification, and
redirects followed by the connector without leaking credentials.
- Experimental HTTP/3 over QUIC, off by default, with the optional
io.netty:netty-codec-http3 dependency and its native library. The server
advertises it with Alt-Svc. Limits are documented in Http3Support.
- MultiPartRepresentation has its own Part type, parser and generator.
- Removed the Jetty classes, the client cookie and authentication stores, and
the Jetty-specific parameters (see changes.md).
- The SLF4J extension re-exports org.slf4j and uses slf4j-simple in tests.
- New tests for redirects, the proxy, back-pressure, HTTP/2 multiplexing, the
503 limit, TLS client authentication and HTTP/3.
Signed-off-by: Jerome Louvel <374450+jlouvel@users.noreply.github.com>
- Wait for the calls in progress with a condition on graceful stop, instead of polling with Thread.sleep (S2276, the blocker failing the quality gate). - Retry on another ephemeral port when the UDP port matching the TCP port is already in use, so HTTP/3 servers started on port 0 don't fail randomly. - Reduce the cognitive complexity of NettyServerHelper.start(), initConnection(), NettyClientCall.writeRequest(), NettyClientHandler.channelRead() and ChannelInputStream.awaitData(). - Pass the helper to NettyServerCall instead of eight parameters. - Declare specific exceptions instead of Exception in Http3Support and the validateConfiguration() hook. - Catch specific throwables in NettyServerHandler.runCall(). - Validate before super() in MultiPartRepresentation, using flexible constructor bodies, and stop assigning the loop counter in unquote(). - Use unnamed catch variables, Math.clamp, constants for the pipeline handler names, parameterized logging, and a loop without break statements. - Tests: detect back-pressure stalls instead of sleeping a fixed time, and remove an empty debug block. Signed-off-by: Jerome Louvel <374450+jlouvel@users.noreply.github.com>
- Re-interrupt the thread when interrupted while creating the HTTP/3 client (S2142, the reliability issue failing the quality gate), and catch the specific exceptions it declares. - Keep the Condition waits of ChannelInputStream inside the while loop that rechecks the state (S2274). - Move the argument checks of the MultiPartRepresentation parsing constructor into a static method called in super() (S8444). Signed-off-by: Jerome Louvel <374450+jlouvel@users.noreply.github.com>
Collaborator
Author
|
@thboileau Could you review this PR? |
Collaborator
|
I see some unit tests failing when I run
|
thboileau-git
approved these changes
Oct 19, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Milestone 2 of Restlet 3.0: the HTTP/HTTPS server and client connectors of the core move from Jetty 12 to Netty 4.2, and Java 25 becomes the baseline. The connector class names are unchanged (
HttpServerHelper,HttpsServerHelper,HttpClientHelper), and no Netty type is exposed by the public API.Main changes
threadPool.virtual).server.maxConcurrentCallsanswers 503 above its limit.CONNECTfor HTTPS.io.netty:netty-codec-http3dependency and its native library.Alt-Svc.Http3Support.MultiPartRepresentationhas its ownParttype, parser and generator, with no Jetty types.org.slf4jand usesslf4j-simplein tests, because the logger implementation used to come from Jetty.Protocol.WARconstant, a leftover of the Servlet mode.Breaking changes
All breaking changes are listed in the Milestone 2 section of
changes.md: removed APIs, renamed or removed parameters, the HTTP/3 status, and the multipart API.Tests
Protocol.WARcommit. After it, onlyProtocolTestCaseandHttp3TestCasewere re-run, and both pass.Review notes
HTTPS/1.1on HTTP/2 and HTTP/3 calls, as with Jetty. The real version is in theorg.restlet.http.versionattribute.