dims 01/08/30 10:44:21 Modified: src/org/apache/cocoon/reading Tag: cocoon_20_branch ResourceReader.java Log: Patch for "ResourceReader does not check for the unavailability of an InputSource's timestamp" from Joerg Henne <[EMAIL PROTECTED]> Revision Changes Path No revision No revision 1.3.2.6 +9 -3 xml-cocoon2/src/org/apache/cocoon/reading/ResourceReader.java Index: ResourceReader.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/reading/ResourceReader.java,v retrieving revision 1.3.2.5 retrieving revision 1.3.2.6 diff -u -r1.3.2.5 -r1.3.2.6 --- ResourceReader.java 2001/08/22 03:57:59 1.3.2.5 +++ ResourceReader.java 2001/08/30 17:44:21 1.3.2.6 @@ -31,7 +31,7 @@ /** * * @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a> - * @version CVS $Revision: 1.3.2.5 $ $Date: 2001/08/22 03:57:59 $ + * @version CVS $Revision: 1.3.2.6 $ $Date: 2001/08/30 17:44:21 $ * * The <code>ResourceReader</code> component is used to serve binary data * in a sitemap pipeline. It makes use of HTTP Headers to determine if @@ -84,7 +84,10 @@ * @return The generated key hashes the src */ public long generateKey() { - return HashUtil.hash(this.inputSource.getSystemId()); + if (this.inputSource.getLastModified() != 0) { + return HashUtil.hash(this.inputSource.getSystemId()); + } + return 0; } /** @@ -94,7 +97,10 @@ * component is currently not cacheable. */ public CacheValidity generateValidity() { - return new TimeStampCacheValidity(this.inputSource.getLastModified()); + if (this.inputSource.getLastModified() != 0) { + return new TimeStampCacheValidity(this.inputSource.getLastModified()); + } + return null; } /** ---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]