Skip to content

Commit

Permalink
Silently ignore rather than warn for known, unsupported HTTP/2 settings
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed Dec 15, 2024
1 parent 27fd358 commit 5fe48ee
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions java/org/apache/coyote/http2/ConnectionSettingsBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ final void set(Setting setting, long value) throws T {
case NO_RFC7540_PRIORITIES:
validateNoRfc7540Priorities(value);
break;
case ENABLE_CONNECT_PROTOCOL:
case TLS_RENEG_PERMITTED:
// Not supported. Ignore it.
return;
case UNKNOWN:
// Unrecognised. Ignore it.
return;
Expand Down
8 changes: 8 additions & 0 deletions java/org/apache/coyote/http2/Setting.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ enum Setting {
INITIAL_WINDOW_SIZE(4),
MAX_FRAME_SIZE(5),
MAX_HEADER_LIST_SIZE(6),
ENABLE_CONNECT_PROTOCOL(8),
NO_RFC7540_PRIORITIES(9),
TLS_RENEG_PERMITTED(10),
UNKNOWN(Integer.MAX_VALUE);

private final int id;
Expand Down Expand Up @@ -61,9 +63,15 @@ static Setting valueOf(int i) {
case 6: {
return MAX_HEADER_LIST_SIZE;
}
case 8: {
return ENABLE_CONNECT_PROTOCOL;
}
case 9: {
return NO_RFC7540_PRIORITIES;
}
case 10: {
return TLS_RENEG_PERMITTED;
}
default: {
return UNKNOWN;
}
Expand Down
8 changes: 8 additions & 0 deletions webapps/docs/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@
</update>
</changelog>
</subsection>
<subsection name="Coyote">
<changelog>
<fix>
Don't log warnings for registered HTTP/2 settings that Tomcat does not
support. These settings are now silently ignored. (markt)
</fix>
</changelog>
</subsection>
</section>
<section name="Tomcat 10.1.34 (schultz)" rtext="in development">
<subsection name="Catalina">
Expand Down

0 comments on commit 5fe48ee

Please sign in to comment.