Merge branch '3.1.x'

pull/35820/head
Stephane Nicoll 1 year ago
commit 8589401b65

@ -7,6 +7,6 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8
kotlinVersion=1.8.22 kotlinVersion=1.8.22
nativeBuildToolsVersion=0.9.22 nativeBuildToolsVersion=0.9.22
springFrameworkVersion=6.0.10-SNAPSHOT springFrameworkVersion=6.0.10-SNAPSHOT
tomcatVersion=10.1.8 tomcatVersion=10.1.9
kotlin.stdlib.default.dependency=false kotlin.stdlib.default.dependency=false

@ -475,6 +475,7 @@ public class ServerProperties {
/** /**
* Whether to reject requests with illegal header names or values. * Whether to reject requests with illegal header names or values.
*/ */
@Deprecated(since = "2.7.12", forRemoval = true)
private boolean rejectIllegalHeader = true; private boolean rejectIllegalHeader = true;
/** /**
@ -633,6 +634,7 @@ public class ServerProperties {
this.connectionTimeout = connectionTimeout; this.connectionTimeout = connectionTimeout;
} }
@DeprecatedConfigurationProperty(reason = "The setting has been deprecated in Tomcat")
public boolean isRejectIllegalHeader() { public boolean isRejectIllegalHeader() {
return this.rejectIllegalHeader; return this.rejectIllegalHeader;
} }

@ -198,6 +198,7 @@ public class TomcatWebServerFactoryCustomizer
factory.addConnectorCustomizers((connector) -> connector.setProperty("relaxedQueryChars", relaxedChars)); factory.addConnectorCustomizers((connector) -> connector.setProperty("relaxedQueryChars", relaxedChars));
} }
@SuppressWarnings("deprecation")
private void customizeRejectIllegalHeader(ConfigurableTomcatWebServerFactory factory, boolean rejectIllegalHeader) { private void customizeRejectIllegalHeader(ConfigurableTomcatWebServerFactory factory, boolean rejectIllegalHeader) {
factory.addConnectorCustomizers((connector) -> { factory.addConnectorCustomizers((connector) -> {
ProtocolHandler handler = connector.getProtocolHandler(); ProtocolHandler handler = connector.getProtocolHandler();

@ -437,6 +437,7 @@ class TomcatWebServerFactoryCustomizerTests {
} }
@Test @Test
@Deprecated(since = "2.7.12", forRemoval = true)
void testCustomizeRejectIllegalHeader() { void testCustomizeRejectIllegalHeader() {
bind("server.tomcat.reject-illegal-header=false"); bind("server.tomcat.reject-illegal-header=false");
customizeAndRunServer((server) -> assertThat( customizeAndRunServer((server) -> assertThat(

Loading…
Cancel
Save