You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/02/10 17:25:06 UTC

[tomcat] branch main updated: Update changelog for #467

This is an automated email from the ASF dual-hosted git repository.

markt 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 a754fc0  Update changelog for #467
a754fc0 is described below

commit a754fc05208215bde7016c0e274b0f845dc457e1
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Feb 10 17:24:49 2022 +0000

    Update changelog for #467
---
 java/org/apache/tomcat/util/http/FastHttpDateFormat.java | 1 +
 webapps/docs/changelog.xml                               | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index 76cffcd..932208b 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -94,6 +94,7 @@ public final class FastHttpDateFormat {
      */
     public static final String getCurrentDate() {
         long now = System.currentTimeMillis();
+        // Handle case where time moves backwards (e.g. system time corrected)
         if (Math.abs(now - currentDateGenerated) > 1000) {
             currentDate = FORMAT_RFC5322.format(new Date(now));
             currentDateGenerated = now;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 280f03b..0bf6ed7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -152,6 +152,12 @@
         OpenSSL for TLS between MacOS and Linux/Windows as the root cause was
         traced to configuration differences. (markt)
       </fix>
+      <fix>
+        <pr>467</pr>: When system time moves backwards (e.g. after clock
+        correction), ensure that the cached formatted current date used for
+        HTTP headers tracks this change. Pull request provided by zhenguoli.
+        (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Web applications">

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org