This repository was archived by the owner on May 8, 2026. It is now read-only.
Commit e4986d6
Add :protocol pseudo-header support for Extended CONNECT (RFC 9220) (#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>1 parent 1da2cb7 commit e4986d6
3 files changed
Lines changed: 70 additions & 7 deletions
File tree
- src/main/java/io/netty/incubator/codec/http3
Lines changed: 40 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
55 | 66 | | |
56 | 67 | | |
57 | 68 | | |
| |||
184 | 195 | | |
185 | 196 | | |
186 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
187 | 213 | | |
188 | 214 | | |
189 | 215 | | |
| |||
224 | 250 | | |
225 | 251 | | |
226 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
227 | 266 | | |
228 | 267 | | |
229 | 268 | | |
| |||
Lines changed: 24 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
85 | 103 | | |
86 | 104 | | |
87 | 105 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
| |||
0 commit comments