Commit 7c9b2afa authored by Stephane Nicoll's avatar Stephane Nicoll

Merge branch '1.4.x' into 1.5.x

parents ec0cc0fe 3c286872
......@@ -834,7 +834,7 @@ public class ServerProperties
if (maxHttpHeaderSize > 0) {
customizeMaxHttpHeaderSize(factory, maxHttpHeaderSize);
}
if (this.maxHttpPostSize > 0) {
if (this.maxHttpPostSize != 0) {
customizeMaxHttpPostSize(factory, this.maxHttpPostSize);
}
if (this.accesslog.enabled) {
......
......@@ -574,6 +574,25 @@ public class ServerPropertiesTests {
}
}
@Test
public void customTomcatDisableMaxHttpPostSize() {
Map<String, String> map = new HashMap<String, String>();
map.put("server.tomcat.max-http-post-size", "-1");
bindProperties(map);
TomcatEmbeddedServletContainerFactory container = new TomcatEmbeddedServletContainerFactory(0);
this.properties.customize(container);
TomcatEmbeddedServletContainer embeddedContainer =
(TomcatEmbeddedServletContainer) container.getEmbeddedServletContainer();
embeddedContainer.start();
try {
assertThat(embeddedContainer.getTomcat().getConnector().getMaxPostSize())
.isEqualTo(-1);
}
finally {
embeddedContainer.stop();
}
}
@Test
@Deprecated
public void customTomcatMaxHttpPostSizeWithDeprecatedProperty() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment