Merged V3.2 to HEAD

18437: Fix for issue where thumbnails were generating requests to repository even for cachable data - and fixed incorrect ETag header set by StreamContent WebScripts

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18438 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2010-02-03 15:01:03 +00:00
parent 6d6f70b5af
commit 5317a53664

View File

@@ -382,8 +382,8 @@ public class StreamContent extends AbstractWebScript
throw new WebScriptException(HttpServletResponse.SC_NOT_FOUND, "Unable to locate content for node ref " + nodeRef + " (property: " + propertyQName.toString() + ")"); throw new WebScriptException(HttpServletResponse.SC_NOT_FOUND, "Unable to locate content for node ref " + nodeRef + " (property: " + propertyQName.toString() + ")");
} }
// Stream the cotent // Stream the content
streamContentImpl(req, res, reader, attach, modified, String.valueOf(modifiedSince), attachFileName); streamContentImpl(req, res, reader, attach, modified, String.valueOf(modified.getTime()), attachFileName);
} }
/** /**
@@ -549,6 +549,7 @@ public class StreamContent extends AbstractWebScript
Cache cache = new Cache(); Cache cache = new Cache();
cache.setNeverCache(false); cache.setNeverCache(false);
cache.setMustRevalidate(true); cache.setMustRevalidate(true);
cache.setMaxAge(0L);
cache.setLastModified(modified); cache.setLastModified(modified);
cache.setETag(eTag); cache.setETag(eTag);
res.setCache(cache); res.setCache(cache);