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
This commit is contained in:
Andy Wilkinson 2022-06-10 12:40:40 +01:00
parent b6ebf4a7db
commit 36f01eb40b
1 changed files with 0 additions and 5 deletions

View File

@ -280,11 +280,6 @@ public class TomcatWebServerFactoryCustomizer
if (handler instanceof AbstractHttp11Protocol) {
AbstractHttp11Protocol protocol = (AbstractHttp11Protocol) handler;
protocol.setMaxHttpHeaderSize(maxHttpHeaderSize);
for (UpgradeProtocol upgradeProtocol : protocol.findUpgradeProtocols()) {
if (upgradeProtocol instanceof Http2Protocol) {
((Http2Protocol) upgradeProtocol).setMaxHeaderSize(maxHttpHeaderSize);
}
}
}
});
}