From b80f4cc9853234e51510f5b9f842d051edc98b11 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 20 Apr 2023 08:08:03 +0100 Subject: [PATCH] Upgrade to Tomcat 10.1.8 Closes gh-35089 --- gradle.properties | 2 +- .../java/org/springframework/boot/web/server/MimeMappings.java | 2 +- .../springframework/boot/web/server/mime-mappings.properties | 2 +- .../org/springframework/boot/web/server/MimeMappingsTests.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index f4fe7fad0d..72987f498f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ org.gradle.parallel=true org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 kotlinVersion=1.7.22 -tomcatVersion=10.1.7 +tomcatVersion=10.1.8 nativeBuildToolsVersion=0.9.21 kotlin.stdlib.default.dependency=false diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java index 849989d894..6b1e59baac 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java @@ -259,7 +259,7 @@ public sealed class MimeMappings implements Iterable { mappings.add("jpe", "image/jpeg"); mappings.add("jpeg", "image/jpeg"); mappings.add("jpg", "image/jpeg"); - mappings.add("js", "application/javascript"); + mappings.add("js", "text/javascript"); mappings.add("json", "application/json"); mappings.add("otf", "font/otf"); mappings.add("pdf", "application/pdf"); diff --git a/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/web/server/mime-mappings.properties b/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/web/server/mime-mappings.properties index ab9ebf0019..4723c0b932 100644 --- a/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/web/server/mime-mappings.properties +++ b/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/web/server/mime-mappings.properties @@ -381,7 +381,7 @@ jpg=image/jpeg jpgm=video/jpm jpgv=video/jpeg jpm=video/jpm -js=application/javascript +js=text/javascript jsf=text/plain json=application/json jsonml=application/jsonml+json diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/MimeMappingsTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/MimeMappingsTests.java index 7cb5e324a8..273b4c64c5 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/MimeMappingsTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/MimeMappingsTests.java @@ -221,7 +221,7 @@ class MimeMappingsTests { .loadProperties(new ClassPathResource("mime-mappings.properties", getClass())); Properties tomcatDefaultMimeMappings = PropertiesLoaderUtils .loadProperties(new ClassPathResource("MimeTypeMappings.properties", Tomcat.class)); - assertThat(ourDefaultMimeMappings).isEqualTo(tomcatDefaultMimeMappings); + assertThat(ourDefaultMimeMappings).containsExactlyInAnyOrderEntriesOf(tomcatDefaultMimeMappings); } @Test