Merged RETURN-OF-THE-API (5.2.0) to HEAD (5.2)

128054: REPO-495: When uploading/updating binary content, guess mimetype and encoding
   - follow similar pattern to v0 Upload API (ignore Content-Type header)
   - in the future, we might wish to loosen this restriction [pending MNT-16381] and/or allow admin's option to update mimeType/encoding directly via node metadata update


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@128104 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2016-06-09 16:13:50 +00:00
parent 41ae7f2d10
commit 939ed76c22
4 changed files with 137 additions and 121 deletions

View File

@@ -335,7 +335,7 @@ public class SharedLinkApiTest extends AbstractBaseApiTest
assertArrayEquals(content2Text.getBytes(), response.getResponseAsBytes());
responseHeaders = response.getHeaders();
assertNotNull(responseHeaders);
assertEquals(file2_MimeType+";charset=UTF-8", responseHeaders.get("Content-Type"));
assertEquals(file2_MimeType+";charset=ISO-8859-1", responseHeaders.get("Content-Type"));
assertNotNull(responseHeaders.get("Expires"));
assertNotNull(responseHeaders.get(LAST_MODIFIED_HEADER));
assertEquals("attachment; filename=\"" + fileName2 + "\"; filename*=UTF-8''" + fileName2 + "", responseHeaders.get("Content-Disposition"));