Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)

123868 jkaabimofrad: RA-856: Added support for REST APIs “/content” endpoints to optionally set their own cache. (Currently, only the Renditions API is setting its own cache)
       - Removed the http attachment header setting from the AbstractResourceWebScript, as the ContentStreamer already has this feature
       - Reformatted ContentStreamer according to Alfresco code standards 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126543 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 11:24:48 +00:00
parent 27fe28b906
commit f79e7be94d
9 changed files with 372 additions and 164 deletions

View File

@@ -2739,7 +2739,10 @@ public class NodeApiTest extends AbstractBaseApiTest
Map<String, String> responseHeaders = response.getHeaders();
assertNotNull(responseHeaders);
assertEquals("attachment; filename=\"quick-1.txt\"; filename*=UTF-8''quick-1.txt", responseHeaders.get("Content-Disposition"));
assertNotNull(responseHeaders.get("Cache-Control"));
String cacheControl = responseHeaders.get("Cache-Control");
assertNotNull(cacheControl);
assertTrue(cacheControl.contains("must-revalidate"));
assertTrue(cacheControl.contains("max-age=0"));
assertNotNull(responseHeaders.get("Expires"));
String lastModifiedHeader = responseHeaders.get(LAST_MODIFIED_HEADER);
assertNotNull(lastModifiedHeader);