|
|
|
@ -130,7 +130,7 @@ class ServerPropertiesTests {
|
|
|
|
|
map.put("server.tomcat.remoteip.protocol-header", "X-Forwarded-Protocol");
|
|
|
|
|
map.put("server.tomcat.remoteip.remote-ip-header", "Remote-Ip");
|
|
|
|
|
map.put("server.tomcat.remoteip.internal-proxies", "10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
|
|
|
|
|
map.put("server.tomcat.reject-illegal-header", "true");
|
|
|
|
|
map.put("server.tomcat.reject-illegal-header", "false");
|
|
|
|
|
map.put("server.tomcat.background-processor-delay", "10");
|
|
|
|
|
map.put("server.tomcat.relaxed-path-chars", "|,<");
|
|
|
|
|
map.put("server.tomcat.relaxed-query-chars", "^ , | ");
|
|
|
|
@ -153,7 +153,7 @@ class ServerPropertiesTests {
|
|
|
|
|
assertThat(tomcat.getRemoteip().getRemoteIpHeader()).isEqualTo("Remote-Ip");
|
|
|
|
|
assertThat(tomcat.getRemoteip().getProtocolHeader()).isEqualTo("X-Forwarded-Protocol");
|
|
|
|
|
assertThat(tomcat.getRemoteip().getInternalProxies()).isEqualTo("10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
|
|
|
|
|
assertThat(tomcat.getRejectIllegalHeader()).isTrue();
|
|
|
|
|
assertThat(tomcat.isRejectIllegalHeader()).isFalse();
|
|
|
|
|
assertThat(tomcat.getBackgroundProcessorDelay()).hasSeconds(10);
|
|
|
|
|
assertThat(tomcat.getRelaxedPathChars()).containsExactly('|', '<');
|
|
|
|
|
assertThat(tomcat.getRelaxedQueryChars()).containsExactly('^', '|');
|
|
|
|
@ -408,8 +408,9 @@ class ServerPropertiesTests {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void tomcatRejectIllegalHeaderDefaultsToNull() {
|
|
|
|
|
assertThat(this.properties.getTomcat().getRejectIllegalHeader()).isNull();
|
|
|
|
|
void tomcatRejectIllegalHeaderMatchesProtocolDefault() throws Exception {
|
|
|
|
|
assertThat(getDefaultProtocol()).hasFieldOrPropertyWithValue("rejectIllegalHeader",
|
|
|
|
|
this.properties.getTomcat().isRejectIllegalHeader());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|