Allow the tomcat maxHttpHeaderSize to be changed in external config
Prevents large SPNEGO headers from causing server errors for example. Added the property to ServerProperties. Fixes gh-931
This commit is contained in:
@@ -34,7 +34,7 @@ import static org.mockito.Mockito.verify;
|
||||
|
||||
/**
|
||||
* Tests for {@link ServerProperties}.
|
||||
*
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@@ -97,4 +97,13 @@ public class ServerPropertiesTests {
|
||||
assertEquals("US-ASCII", this.properties.getTomcat().getUriEncoding());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCustomizeTomcatHeaderSize() throws Exception {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
map.put("server.tomcat.maxHttpHeaderSize", "9999");
|
||||
new RelaxedDataBinder(this.properties, "server").bind(new MutablePropertyValues(
|
||||
map));
|
||||
assertEquals(9999, this.properties.getTomcat().getMaxHttpHeaderSize());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user