SLNG-804: Fix for thumbnails caching in the share client

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10979 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2008-09-23 09:44:42 +00:00
parent 3d5138831c
commit 540cc69fe2

View File

@@ -377,7 +377,7 @@ public class StreamContent extends AbstractWebScript
}
// Stream the cotent
streamContentImpl(req, res, reader, attach, modified);
streamContentImpl(req, res, reader, attach, modified, String.valueOf(modifiedSince));
}
/**
@@ -422,7 +422,7 @@ public class StreamContent extends AbstractWebScript
reader.setMimetype(mimetype);
reader.setEncoding("UTF-8");
streamContentImpl(req, res, reader, attach, this.resouceFileModifiedDate);
streamContentImpl(req, res, reader, attach, this.resouceFileModifiedDate, String.valueOf(this.resouceFileModifiedDate.getTime()));
}
/**
@@ -435,7 +435,7 @@ public class StreamContent extends AbstractWebScript
* @param modified
* @throws IOException
*/
protected void streamContentImpl(WebScriptRequest req, WebScriptResponse res, ContentReader reader, boolean attach, Date modified)
protected void streamContentImpl(WebScriptRequest req, WebScriptResponse res, ContentReader reader, boolean attach, Date modified, String eTag)
throws IOException
{
HttpServletRequest httpReq = ((WebScriptServletRequest)req).getHttpServletRequest();
@@ -477,6 +477,7 @@ public class StreamContent extends AbstractWebScript
cache.setNeverCache(false);
cache.setMustRevalidate(true);
cache.setLastModified(modified);
cache.setETag(eTag);
res.setCache(cache);
// get the content and stream directly to the response output stream