This repository was archived by the owner on May 8, 2026. It is now read-only.
Commit d98bffe
authored
Ignore unknown Http3Setting Identifier in Http3SettingsFrame (#360)
* According to the spec
https://www.rfc-editor.org/rfc/rfc9114.html#section-7.2.4-9 , endpoints
**must ignore unknown settings identifiers**. Netty’s previous behavior
incorrectly **stored** unknown settings values, which contradicts RFC
behaviour.
* A **HTTP/3 error code** was missing - H3_DATAGRAM_ERROR
* The **SETTINGS_H3_DATAGRAM (0x33)** identifier was not added.
* Prior behaviour fixed in
[https://github.com/netty/netty/pull/15835](https://github.com/netty/netty/pull/15835)
still allowed direct injection of unsupported settings; this PR
effectively deprecates that direct-settings behaviour completely.
---
* [x] **Ignore unknown HTTP/3 SETTINGS identifiers**
* Updated parsing logic to skip unknown settings identifiers:
```java // When Non-Standard/Unknown settings identifier present -
Ignore if (Http3SettingIdentifier.fromId(key) == null) { return value; }
```
* Unknown settings are **no longer stored** in `Http3Settings`.
* Fully aligns with HTTP/3 specification behaviour.
* Effectively **deprecates the old direct-settings behavior**
introduced/fixed in PR #15835.
* [x] **Added missing HTTP/3 error codes**
* Implemented the remaining H3 error codes defined in the RFC.
* Ensures accurate error propagation and complete protocol support.
* [x] **Added `SETTINGS_H3_DATAGRAM (0x33)`**
* Introduced the identifier:
```java SETTINGS_H3_DATAGRAM(0x33) ```
* Added proper handling in both encoder and decoder paths.
* [x] **Added unit tests**
* Tests covering:
* Ignoring unknown setting identifiers
* Correct handling of `SETTINGS_H3_DATAGRAM`
* Verification of newly added error codes
* Ensuring unknown settings do **not** appear in `Http3Settings`
---
* [x] Netty now **correctly ignores unknown HTTP/3 settings**, as
required by the specification.
* [x] `Http3Settings` no longer stores invalid or non-standard
identifiers.
* [x] Full support for **`SETTINGS_H3_DATAGRAM (0x33)`**.
* [x] Complete coverage of **HTTP/3 error codes**.
* [x] Added unit tests ensure long-term correctness.
* [x] Behaviour from PR #15835 is effectively superseded and corrected.
Fixes #[15908](netty/netty#15908) Port of
netty/netty#159091 parent b080b82 commit d98bffe
7 files changed
Lines changed: 265 additions & 71 deletions
File tree
- src
- main/java/io/netty/incubator/codec/http3
- test/java/io/netty/incubator/codec/http3
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
23 | 33 | | |
24 | 34 | | |
25 | 35 | | |
| |||
Lines changed: 124 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
0 commit comments