Remove deprecated code

See gh-7362
This commit is contained in:
Stephane Nicoll
2016-11-25 10:10:55 +01:00
parent f260cd9a07
commit e81f7d5811
2 changed files with 0 additions and 44 deletions

View File

@@ -145,11 +145,6 @@ public class ServerProperties
*/
private int maxHttpHeaderSize = 0; // bytes
/**
* Maximum size in bytes of the HTTP post content.
*/
private int maxHttpPostSize = 0; // bytes
/**
* Time in milliseconds that connectors will wait for another HTTP request before
* closing the connection. When not set, the connector's container-specific default
@@ -362,20 +357,6 @@ public class ServerProperties
this.maxHttpHeaderSize = maxHttpHeaderSize;
}
@Deprecated
@DeprecatedConfigurationProperty(reason = "Use dedicated property for each container.")
public int getMaxHttpPostSize() {
return this.maxHttpPostSize;
}
@Deprecated
public void setMaxHttpPostSize(int maxHttpPostSize) {
this.maxHttpPostSize = maxHttpPostSize;
this.jetty.setMaxHttpPostSize(maxHttpPostSize);
this.tomcat.setMaxHttpPostSize(maxHttpPostSize);
this.undertow.setMaxHttpPostSize(maxHttpPostSize);
}
protected final boolean getOrDeduceUseForwardHeaders() {
if (this.useForwardHeaders != null) {
return this.useForwardHeaders;

View File

@@ -305,16 +305,6 @@ public class ServerPropertiesTests {
assertThat(this.properties.getMaxHttpHeaderSize()).isEqualTo(9999);
}
@Test
public void testCustomizePostSize() throws Exception {
Map<String, String> map = new HashMap<String, String>();
map.put("server.maxHttpPostSize", "9999");
bindProperties(map);
assertThat(this.properties.getJetty().getMaxHttpPostSize()).isEqualTo(9999);
assertThat(this.properties.getTomcat().getMaxHttpPostSize()).isEqualTo(9999);
assertThat(this.properties.getUndertow().getMaxHttpPostSize()).isEqualTo(9999);
}
@Test
public void testCustomizeJettyAcceptors() throws Exception {
Map<String, String> map = new HashMap<String, String>();
@@ -492,21 +482,6 @@ public class ServerPropertiesTests {
.isEqualTo(10000);
}
@Test
@Deprecated
public void customTomcatMaxHttpPostSizeWithDeprecatedProperty() {
Map<String, String> map = new HashMap<String, String>();
map.put("server.max-http-post-size", "2000");
bindProperties(map);
TomcatEmbeddedServletContainerFactory container = new TomcatEmbeddedServletContainerFactory();
this.properties.customize(container);
TomcatEmbeddedServletContainer embeddedContainer = (TomcatEmbeddedServletContainer) container
.getEmbeddedServletContainer();
assertThat(embeddedContainer.getTomcat().getConnector().getMaxPostSize())
.isEqualTo(2000);
}
@Test
public void customizeUndertowAccessLog() {
Map<String, String> map = new HashMap<String, String>();