Skip to content
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
normanmaurer merged 1 commit into
mainfrom
connect
Nov 6, 2025
Merged

Add :protocol pseudo-header support for Extended CONNECT (RFC 9220) (…#352
normanmaurer merged 1 commit into
mainfrom
connect

Conversation

@normanmaurer

Copy link
Copy Markdown
Member

…#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

  • WebTransport over HTTP/3 (draft-ietf-webtrans-http3)

  • RFC 9114: HTTP/3 Section 4.4

…#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>
@normanmaurer

Copy link
Copy Markdown
Member Author

This is a port of netty/netty#15771

@normanmaurer normanmaurer added this to the 0.0.31.Final milestone Nov 6, 2025
@normanmaurer
normanmaurer merged commit b598f4f into main Nov 6, 2025
5 checks passed
@normanmaurer
normanmaurer deleted the connect branch November 6, 2025 09:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant