Browse Source

Upgrade to Tomcat 10.1.9

Closes gh-35819
pull/36038/head
Stephane Nicoll 3 years ago
parent
commit
27ee605f91
  1. 2
      gradle.properties
  2. 2
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
  3. 1
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.java
  4. 1
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java

2
gradle.properties

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

2
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java

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

1
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.java

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

1
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java

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

Loading…
Cancel
Save