This repository was archived by the owner on May 8, 2026. It is now read-only.
Add :protocol pseudo-header support for Extended CONNECT (RFC 9220) (… - #352
Merged
Conversation
…#15771) Netty's HTTP/3 codec currently only recognizes the standard pseudo-headers (`:method`, `:scheme`, `:authority`, `:path`, `:status`), but RFC 9220 defines an additional `:protocol` pseudo-header for Extended CONNECT requests. This prevents applications from implementing WebTransport over HTTP/3 and WebSocket over HTTP/3. - Added `PROTOCOL` enum value to `Http3Headers.PseudoHeaderName` - Added `protocol()` getter and `protocol(CharSequence)` setter to `Http3Headers` interface - Implemented protocol methods in `DefaultHttp3Headers` - Enhanced `Http3HeadersSink` validation to distinguish between: - Regular CONNECT (requires `:method`, `:authority`) - Extended CONNECT (requires `:method`, `:scheme`, `:authority`, `:path`, `:protocol`) - Extended CONNECT requests with `:protocol` header are now accepted - WebTransport over HTTP/3 implementations can use Netty's HTTP/3 codec - WebSocket over HTTP/3 (RFC 9220) is now supported - Fully backward compatible with existing CONNECT requests - [RFC 9220: Bootstrapping WebSockets with HTTP/3](https://www.rfc-editor.org/rfc/rfc9220.html) - [WebTransport over HTTP/3 (draft-ietf-webtrans-http3)](https://datatracker.ietf.org/doc/draft-ietf-webtrans-http3/) - [RFC 9114: HTTP/3](https://www.rfc-editor.org/rfc/rfc9114.html) Section 4.4 Co-authored-by: Paul Gregoire <mondain@gmail.com>
Member
Author
|
This is a port of netty/netty#15771 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
…#15771)
Netty's HTTP/3 codec currently only recognizes the standard pseudo-headers (
:method,:scheme,:authority,:path,:status), but RFC 9220 defines an additional:protocolpseudo-header for Extended CONNECT requests. This prevents applications from implementing WebTransport over HTTP/3 and WebSocket over HTTP/3.Added
PROTOCOLenum value toHttp3Headers.PseudoHeaderNameAdded
protocol()getter andprotocol(CharSequence)setter toHttp3HeadersinterfaceImplemented protocol methods in
DefaultHttp3HeadersEnhanced
Http3HeadersSinkvalidation to distinguish between::method,:authority)Extended CONNECT (requires
:method,:scheme,:authority,:path,:protocol)Extended CONNECT requests with
:protocolheader are now acceptedWebTransport over HTTP/3 implementations can use Netty's HTTP/3 codec
WebSocket over HTTP/3 (RFC 9220) is now supported
Fully backward compatible with existing CONNECT requests
RFC 9220: Bootstrapping WebSockets with HTTP/3
WebTransport over HTTP/3 (draft-ietf-webtrans-http3)
RFC 9114: HTTP/3 Section 4.4