tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1502254 - /tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
Date Thu, 11 Jul 2013 15:58:31 GMT
Author: markt
Date: Thu Jul 11 15:58:31 2013
New Revision: 1502254

URL: http://svn.apache.org/r1502254
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55228
Allow applications to set the Date header.

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1502254&r1=1502253&r2=1502254&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Thu Jul 11 15:58:31
2013
@@ -1429,8 +1429,12 @@ public abstract class AbstractHttp11Proc
             }
         }
 
-        // Add date header
-        headers.setValue("Date").setString(FastHttpDateFormat.getCurrentDate());
+        // Add date header unless application has already set one (e.g. in a
+        // Caching Filter)
+        if (headers.getValue("Date") == null) {
+            headers.setValue("Date").setString(
+                    FastHttpDateFormat.getCurrentDate());
+        }
 
         // FIXME: Add transfer encoding header
 



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


Mime
View raw message