This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 009d0e0349 Add a change log entry
009d0e0349 is described below
commit 009d0e03494bbd8456b5f526a89359cd2e4a50dd
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Nov 16 11:57:48 2026 +0000
Add a change log entry
---
java/org/apache/catalina/servlets/DefaultServlet.java | 6 +++---
webapps/docs/changelog.xml | 5 +++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java
b/java/org/apache/catalina/servlets/DefaultServlet.java
index b7a2794288..361abfe422 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1284,9 +1284,6 @@ public class DefaultServlet extends HttpServlet {
}
- /*
- * Code borrowed heavily from Jasper's EncodingDetector
- */
/*
* A last modified time in the future must be replaced with the message
origination date (RFC 9110, section
* 8.8.2.1). This is done for each response so the metadata of the
resource, which may be cached, is not changed.
@@ -1300,6 +1297,9 @@ public class DefaultServlet extends HttpServlet {
}
+ /*
+ * Code borrowed heavily from Jasper's EncodingDetector
+ */
private static Charset processBom(InputStream is, boolean stripBom) throws
IOException {
// Java supported character sets do not use BOMs longer than 4 bytes
byte[] bom = new byte[4];
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e1bcbc1f7f..f3116ba351 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -307,6 +307,11 @@
Skip empty elements when parsing entity tag lists. Pull request
<pr>1150</pr> provided by Arturo Bernal. (markt)
</fix>
+ <fix>
+ Ensure that the <code>Last-Modified</code> header, if present, does not
+ represent a date in the future. Pull request <pr>1152</pr> provided by
+ Arturo Bernal. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]