diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java index bf00a27d935..6ad3b20bc70 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java @@ -30,6 +30,7 @@ import org.apache.catalina.core.StandardEngine; import org.apache.catalina.valves.AccessLogValve; import org.apache.catalina.valves.RemoteIpValve; import org.apache.coyote.AbstractProtocol; +import org.apache.coyote.http11.Http11Nio2Protocol; import org.apache.tomcat.util.net.AbstractEndpoint; import org.eclipse.jetty.ee10.servlet.ServletContextHandler; import org.eclipse.jetty.server.Server; @@ -220,6 +221,12 @@ class ServerPropertiesTests { assertThat(this.properties.getMaxHttpRequestHeaderSize()).isEqualTo(DataSize.ofKilobytes(1)); } + @Test + void defaultMaxHttpRequestHeaderSizeMatchesTomcatsDefault() { + assertThat(this.properties.getMaxHttpRequestHeaderSize().toBytes()) + .isEqualTo(new Http11Nio2Protocol().getMaxHttpRequestHeaderSize()); + } + @Test void testCustomizeTomcatMaxThreads() { bind("server.tomcat.threads.max", "10");