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 e2c0fe3 Allow http response date field set to older date
e2c0fe3 is described below
commit e2c0fe327a96258aec6391be3b69b75a7ad8e45d
Author: zhenguoli <[email protected]>
AuthorDate: Wed Jan 19 22:18:42 2022 +0800
Allow http response date field set to older date
---
java/org/apache/tomcat/util/http/FastHttpDateFormat.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index f052474..76cffcd 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -94,7 +94,7 @@ public final class FastHttpDateFormat {
*/
public static final String getCurrentDate() {
long now = System.currentTimeMillis();
- if ((now - currentDateGenerated) > 1000) {
+ if (Math.abs(now - currentDateGenerated) > 1000) {
currentDate = FORMAT_RFC5322.format(new Date(now));
currentDateGenerated = now;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]