cziegeler 2002/06/12 03:20:56
Modified: src/java/org/apache/cocoon/reading ResourceReader.java
Log:
(Re)adding setContentLength to reader
Revision Changes Path
1.17 +2 -10
xml-cocoon2/src/java/org/apache/cocoon/reading/ResourceReader.java
Index: ResourceReader.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/reading/ResourceReader.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ResourceReader.java 5 Jun 2002 06:39:13 -0000 1.16
+++ ResourceReader.java 12 Jun 2002 10:20:56 -0000 1.17
@@ -147,13 +147,7 @@
* possible to detect
*/
public long getLastModified() {
- final SourceValidity validity = this.inputSource.getValidity();
- if (validity instanceof TimeStampValidity) {
- return ((TimeStampValidity)validity).getTimeStamp();
- } else if (validity instanceof FileTimeStampValidity) {
- return ((FileTimeStampValidity)validity).getTimeStamp();
- }
- return 0;
+ return this.inputSource.getLastModified();
}
/**
@@ -170,14 +164,12 @@
response.setDateHeader("Expires", System.currentTimeMillis() +
expires);
}
- /* FIXME: VG: getContentLength is gone.
long contentLength = this.inputSource.getContentLength();
if (contentLength != -1) {
// FIXME (VG): Environment has setContentLength, and
// Response interface has not. Strange.
response.setHeader("Content-Length", Long.toString(contentLength));
}
- */
// Bug #9539: This resource reader does not support ranges
response.setHeader("Accept-Ranges", "none");
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]