roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gango...@apache.org
Subject svn commit: r440599 - in /incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets: FeedServlet.java PageServlet.java PlanetFeedServlet.java RSDServlet.java ResourceServlet.java
Date Wed, 06 Sep 2006 03:35:02 GMT
Author: gangolli
Date: Tue Sep  5 20:35:02 2006
New Revision: 440599

URL: http://svn.apache.org/viewvc?view=rev&rev=440599
Log:
Add Expires header in past wherever we set Last-Modified.

Modified:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/FeedServlet.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/RSDServlet.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/ResourceServlet.java

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/FeedServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/FeedServlet.java?view=diff&rev=440599&r1=440598&r2=440599
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/FeedServlet.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/FeedServlet.java
Tue Sep  5 20:35:02 2006
@@ -133,6 +133,7 @@
         
         // set last-modified date
         response.setDateHeader("Last-Modified", lastModified);
+        response.setDateHeader("Expires", 0);
         
         // set content type
         String accepts = request.getHeader("Accept");

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java?view=diff&rev=440599&r1=440598&r2=440599
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
Tue Sep  5 20:35:02 2006
@@ -163,17 +163,17 @@
         long lastModified = 0;
         if(isSiteWide) {
             lastModified = siteWideCache.getLastModified().getTime();
-            
+
             // this is needed because the if-modified-since header truncates
             // the last 3 digits of the value, presumably because it can't
-            // handle the high precision and that causes our last mod data to 
+            // handle the high precision and that causes our last mod data to
             // always be up to 1 second more than the one from the header
             lastModified = lastModified - (lastModified % 1000);
-            
+
         } else if (weblog.getLastModified() != null) {
             lastModified = weblog.getLastModified().getTime();
         }
-        
+
         // 304 if-modified-since checking
         long sinceDate = request.getDateHeader("If-Modified-Since");
         log.debug("since date = "+sinceDate);
@@ -186,7 +186,7 @@
                 
         // set last-modified date
         response.setDateHeader("Last-Modified", lastModified);
-        
+        response.setDateHeader("Expires", 0);
                 
         // generate cache key
         String cacheKey = null;

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java?view=diff&rev=440599&r1=440598&r2=440599
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java
Tue Sep  5 20:35:02 2006
@@ -126,6 +126,7 @@
         // small hack here, we add 1 second (1000 ms) to the last mod time to
         // account for some lost precision when converting request date headers
         response.setDateHeader("Last-Modified", lastModified.getTime()+1000);
+        response.setDateHeader("Expires",0);
         
         // cached content checking
         String cacheKey = PlanetCache.CACHE_ID+":"+this.generateKey(planetRequest);

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/RSDServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/RSDServlet.java?view=diff&rev=440599&r1=440598&r2=440599
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/RSDServlet.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/RSDServlet.java
Tue Sep  5 20:35:02 2006
@@ -106,7 +106,7 @@
         
         // set last-modified date
         response.setDateHeader("Last-Modified", weblog.getLastModified().getTime());
-        
+        response.setDateHeader("Expires", 0);
         
         // populate the model
         HashMap model = new HashMap();

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/ResourceServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/ResourceServlet.java?view=diff&rev=440599&r1=440598&r2=440599
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/ResourceServlet.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/ResourceServlet.java
Tue Sep  5 20:35:02 2006
@@ -131,6 +131,7 @@
         // set the content type based on whatever is in our web.xml mime defs
         response.addDateHeader("Last-Modified", (new Date()).getTime());
         response.setContentType(this.context.getMimeType(resource.getAbsolutePath()));
+        response.setDateHeader("Expires", 0);
         
         // ok, lets serve up the file
         byte[] buf = new byte[8192];



Mime
View raw message