cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r410112 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/reading/ResourceReader.java
Date Mon, 29 May 2006 15:52:28 GMT
Author: antonio
Date: Mon May 29 08:52:27 2006
New Revision: 410112

URL: http://svn.apache.org/viewvc?rev=410112&view=rev
Log:
Fix COCOON-1840 XMLFileModule: file-specific configuration ignored. Thanks to Martin Kuck
(martin.kuck@multi-m.de).

Modified:
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/reading/ResourceReader.java

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/reading/ResourceReader.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/reading/ResourceReader.java?rev=410112&r1=410111&r2=410112&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/reading/ResourceReader.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/reading/ResourceReader.java Mon
May 29 08:52:27 2006
@@ -153,12 +153,11 @@
         } catch (SourceException e) {
             throw SourceUtil.handle("Error during resolving of '" + src + "'.", e);
         }
-
         setupHeaders();
     }
 
     /**
-     * Setup the response headers: Accept-Ranges, Expires.
+     * Setup the response headers: Accept-Ranges, Expires, Last-Modified
      */
     protected void setupHeaders() {
         // Tell the client whether we support byte range requests or not
@@ -171,8 +170,12 @@
         if (expires > 0) {
             response.setDateHeader("Expires", System.currentTimeMillis() + expires);
         } else if (expires == 0) {
-            // See Bug #14048
-            response.addHeader("Vary", "Host");
+            response.setDateHeader("Expires", 0);
+        }
+
+        long lastModified = getLastModified(); 
+        if (lastModified > 0) { 
+            response.setDateHeader("Last-Modified", lastModified); 
         }
     }
 
@@ -357,7 +360,6 @@
                 return mimeType;
             }
         }
-
         return inputSource.getMimeType();
     }
 }



Mime
View raw message