mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Align server.tomcat.max-part-count default with Tomcat's default
Fixes gh-49311
This commit is contained in:
+1
-1
@@ -88,7 +88,7 @@ public class TomcatServerProperties {
|
||||
* Maximum total number of parts permitted in a multipart/form-data request. Requests
|
||||
* that exceed this limit will be rejected. A value of less than 0 means no limit.
|
||||
*/
|
||||
private int maxPartCount = 10;
|
||||
private int maxPartCount = 50;
|
||||
|
||||
/**
|
||||
* Maximum amount of request body to swallow.
|
||||
|
||||
+11
@@ -194,6 +194,17 @@ class TomcatServerPropertiesTests {
|
||||
.isEqualTo(getDefaultConnector().getMaxPostSize());
|
||||
}
|
||||
|
||||
@Test
|
||||
void tomcatMaxPartCountMatchesConnectorDefault() {
|
||||
assertThat(this.properties.getMaxPartCount()).isEqualTo(getDefaultConnector().getMaxPartCount());
|
||||
}
|
||||
|
||||
@Test
|
||||
void tomcatMaxPartHeaderSizeMatchesConnectorDefault() {
|
||||
assertThat(this.properties.getMaxPartHeaderSize().toBytes())
|
||||
.isEqualTo(getDefaultConnector().getMaxPartHeaderSize());
|
||||
}
|
||||
|
||||
@Test
|
||||
void tomcatUriEncodingMatchesConnectorDefault() {
|
||||
assertThat(this.properties.getUriEncoding().name()).isEqualTo(getDefaultConnector().getURIEncoding());
|
||||
|
||||
+1
-1
@@ -190,7 +190,7 @@ class TomcatWebServerFactoryCustomizerTests {
|
||||
@Test
|
||||
void defaultMaxPartCount() {
|
||||
customizeAndRunServer(
|
||||
(server) -> assertThat(server.getTomcat().getConnector().getMaxPartCount()).isEqualTo(10));
|
||||
(server) -> assertThat(server.getTomcat().getConnector().getMaxPartCount()).isEqualTo(50));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user