Skip to content

Commit 36f01eb

Browse files
committed
Fix compilation error with Tomcat 10
There's no setter for the max header size in Tomcat 10 as it's now inherited from the underlying HTTP 1.1 protocol. The test that was merged forwards from 2.7.x is retained to verify that this is the case. See gh-31330
1 parent b6ebf4a commit 36f01eb

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,6 @@ private void customizeMaxHttpHeaderSize(ConfigurableTomcatWebServerFactory facto
280280
if (handler instanceof AbstractHttp11Protocol) {
281281
AbstractHttp11Protocol protocol = (AbstractHttp11Protocol) handler;
282282
protocol.setMaxHttpHeaderSize(maxHttpHeaderSize);
283-
for (UpgradeProtocol upgradeProtocol : protocol.findUpgradeProtocols()) {
284-
if (upgradeProtocol instanceof Http2Protocol) {
285-
((Http2Protocol) upgradeProtocol).setMaxHeaderSize(maxHttpHeaderSize);
286-
}
287-
}
288283
}
289284
});
290285
}

0 commit comments

Comments
 (0)