Merge branch '1.5.x'
This commit is contained in:
@@ -236,7 +236,7 @@ public class DefaultServletWebServerFactoryCustomizer
|
||||
if (maxHttpHeaderSize > 0) {
|
||||
customizeMaxHttpHeaderSize(factory, maxHttpHeaderSize);
|
||||
}
|
||||
if (tomcatProperties.getMaxHttpPostSize() > 0) {
|
||||
if (tomcatProperties.getMaxHttpPostSize() != 0) {
|
||||
customizeMaxHttpPostSize(factory, tomcatProperties.getMaxHttpPostSize());
|
||||
}
|
||||
if (tomcatProperties.getAccesslog().isEnabled()) {
|
||||
|
||||
@@ -396,6 +396,24 @@ public class DefaultServletWebServerFactoryCustomizerTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void customTomcatDisableMaxHttpPostSize() {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
map.put("server.tomcat.max-http-post-size", "-1");
|
||||
bindProperties(map);
|
||||
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(0);
|
||||
this.customizer.customize(factory);
|
||||
TomcatWebServer embeddedFactory = (TomcatWebServer) factory.getWebServer();
|
||||
embeddedFactory.start();
|
||||
try {
|
||||
assertThat(embeddedFactory.getTomcat().getConnector().getMaxPostSize())
|
||||
.isEqualTo(-1);
|
||||
}
|
||||
finally {
|
||||
embeddedFactory.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void customizeUndertowAccessLog() {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user