mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -377,7 +377,7 @@ public class StreamContent extends AbstractWebScript
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Stream the cotent
|
// 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.setMimetype(mimetype);
|
||||||
reader.setEncoding("UTF-8");
|
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
|
* @param modified
|
||||||
* @throws IOException
|
* @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
|
throws IOException
|
||||||
{
|
{
|
||||||
HttpServletRequest httpReq = ((WebScriptServletRequest)req).getHttpServletRequest();
|
HttpServletRequest httpReq = ((WebScriptServletRequest)req).getHttpServletRequest();
|
||||||
@@ -477,6 +477,7 @@ public class StreamContent extends AbstractWebScript
|
|||||||
cache.setNeverCache(false);
|
cache.setNeverCache(false);
|
||||||
cache.setMustRevalidate(true);
|
cache.setMustRevalidate(true);
|
||||||
cache.setLastModified(modified);
|
cache.setLastModified(modified);
|
||||||
|
cache.setETag(eTag);
|
||||||
res.setCache(cache);
|
res.setCache(cache);
|
||||||
|
|
||||||
// get the content and stream directly to the response output stream
|
// get the content and stream directly to the response output stream
|
||||||
|
Reference in New Issue
Block a user