roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r450979 - /incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
Date Thu, 28 Sep 2006 19:30:31 GMT
Author: agilliland
Date: Thu Sep 28 12:30:31 2006
New Revision: 450979

URL: http://svn.apache.org/viewvc?view=rev&rev=450979
Log:
fix for 304 issue and weblog "edit" links.  modified the page servlet so that it only returns
304 responses for users who are not logged in.


Modified:
    incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PageServlet.java

Modified: incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PageServlet.java?view=diff&rev=450979&r1=450978&r2=450979
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PageServlet.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PageServlet.java Thu
Sep 28 12:30:31 2006
@@ -168,13 +168,18 @@
             lastModified = weblog.getLastModified().getTime();
         }
 
-        // Respond with 304 Not Modified if it is not modified.
-        if (ModDateHeaderUtil.respondIfNotModified(request,response,lastModified)) {
-            return;
+        // 304 Not Modified handling.
+        // We skip this for logged in users to avoid the scenerio where a user
+        // views their weblog, logs in, then gets a 304 without the 'edit' links
+        if(!pageRequest.isLoggedIn()) {
+            if (ModDateHeaderUtil.respondIfNotModified(request,response,lastModified)) {
+                return;
+            } else {
+                // set last-modified date
+                ModDateHeaderUtil.setLastModifiedHeader(response,lastModified);
+            }
         }
 
-        // set last-modified date
-        ModDateHeaderUtil.setLastModifiedHeader(response,lastModified);
                 
         // generate cache key
         String cacheKey = null;



Mime
View raw message