diff --git a/framework-platform/framework-platform.gradle b/framework-platform/framework-platform.gradle index 9041a5d8f50..5775ab20714 100644 --- a/framework-platform/framework-platform.gradle +++ b/framework-platform/framework-platform.gradle @@ -138,7 +138,6 @@ dependencies { api("org.seleniumhq.selenium:selenium-java:4.41.0") api("org.skyscreamer:jsonassert:1.5.3") api("org.testng:testng:7.12.0") - api("org.webjars:underscorejs:1.8.3") api("org.webjars:webjars-locator-lite:1.1.0") api("org.xmlunit:xmlunit-assertj:2.10.4") api("org.xmlunit:xmlunit-matchers:2.10.4") diff --git a/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java b/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java index 1b9b668ba0d..24add7f4f3d 100644 --- a/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java +++ b/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java @@ -238,7 +238,7 @@ public abstract class MimeTypeUtils { break; } } - else if (ch == '"') { + else if (ch == '"' && mimeType.charAt(nextIndex - 1) != '\\') { quoted = !quoted; } nextIndex++; diff --git a/spring-core/src/test/java/org/springframework/util/MimeTypeTests.java b/spring-core/src/test/java/org/springframework/util/MimeTypeTests.java index b1998ca0795..6346b8ec540 100644 --- a/spring-core/src/test/java/org/springframework/util/MimeTypeTests.java +++ b/spring-core/src/test/java/org/springframework/util/MimeTypeTests.java @@ -98,7 +98,7 @@ class MimeTypeTests { } @Test - void parseQuotedSeparator() { + void parseQuotedParameterValue() { String s = "application/xop+xml;charset=utf-8;type=\"application/soap+xml;action=\\\"https://x.y.z\\\"\""; MimeType mimeType = MimeType.valueOf(s); assertThat(mimeType.getType()).as("Invalid type").isEqualTo("application"); @@ -107,6 +107,15 @@ class MimeTypeTests { assertThat(mimeType.getParameter("type")).isEqualTo("\"application/soap+xml;action=\\\"https://x.y.z\\\"\""); } + @Test + void parseParameterWithQuotedPair() { + String s = "text/plain;twelve=\"1\\\"2\""; + MimeType mimeType = MimeType.valueOf(s); + assertThat(mimeType.getType()).as("Invalid type").isEqualTo("text"); + assertThat(mimeType.getSubtype()).as("Invalid subtype").isEqualTo("plain"); + assertThat(mimeType.getParameter("twelve")).isEqualTo("\"1\\\"2\""); + } + @Test void withConversionService() { ConversionService conversionService = new DefaultConversionService(); diff --git a/spring-web/src/main/java/org/springframework/web/server/WebSession.java b/spring-web/src/main/java/org/springframework/web/server/WebSession.java index a1c823393f9..3142dbf4873 100644 --- a/spring-web/src/main/java/org/springframework/web/server/WebSession.java +++ b/spring-web/src/main/java/org/springframework/web/server/WebSession.java @@ -100,20 +100,6 @@ public interface WebSession { */ boolean isStarted(); - /** - * Generate a new id for the session and update the underlying session - * storage to reflect the new id. After a successful call {@link #getId()} - * reflects the new session id. - * @return completion notification (success or error) - */ - Mono changeSessionId(); - - /** - * Invalidate the current session and clear session storage. - * @return completion notification (success or error) - */ - Mono invalidate(); - /** * Save the session through the {@code WebSessionStore} as follows: *