dims 01/08/30 10:43:21 Modified: src/org/apache/cocoon/reading 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 1.9 +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.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ResourceReader.java 2001/08/22 03:51:05 1.8 +++ ResourceReader.java 2001/08/30 17:43:21 1.9 @@ -31,7 +31,7 @@ /** * * @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a> - * @version CVS $Revision: 1.8 $ $Date: 2001/08/22 03:51:05 $ + * @version CVS $Revision: 1.9 $ $Date: 2001/08/30 17:43: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]