cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 20012] - [Patch] ResourceReader, "304 Not Modified" not working
Date Tue, 20 May 2003 20:15:45 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20012>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20012

[Patch] ResourceReader, "304 Not Modified" not working

bhtek@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ResourceReader, "304 Not    |[Patch] ResourceReader, "304
                   |Modified" not working       |Not Modified" not working



------- Additional Comments From bhtek@yahoo.com  2003-05-20 20:15 -------
In place of test case, here are the specs of how the data (if-modified-since)
arrives.

http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#if-modified-since
http://www.w3.org/Protocols/HTTP/Object_Headers.html#date
http://www.w3.org/Protocols/rfc850/rfc850.html#z10

The diff for someone to patch this.

diff -u -r1.8 HttpEnvironment.java
--- org/apache/cocoon/environment/http/HttpEnvironment.java     16 May 2003
07:04:56 -0000      1.8
+++ org/apache/cocoon/environment/http/HttpEnvironment.java     20 May 2003
20:12:33 -0000
@@ -250,7 +250,7 @@
         if (lastModified != 0) {
             long if_modified_since =
this.request.getDateHeader("If-Modified-Since");
             this.response.setDateHeader("Last-Modified", lastModified);
-            return (if_modified_since < lastModified);
+            return (if_modified_since / 1000 < lastModified / 1000);
         }
         return true;
     }

Mime
View raw message