mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
59743: Merged V4.2-BUG-FIX (4.2.2) to HEAD-BUG-FIX (Cloud/4.3) 59519: Merged V4.1-BUG-FIX (4.1.8) to V4.2-BUG-FIX (4.2.1) 59442: Merged DEV to V4.1-BUG-FIX (4.1.8) 59317: MNT-9900 : Alfresco Explorer is using URL Encoding when downloading a file Removed additional encoding of file name for IE browser. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62182 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -390,11 +390,7 @@ public abstract class BaseDownloadContentServlet extends BaseServlet
|
|||||||
// IE requires that "Content-Disposition" header in case of "attachment" type should include
|
// IE requires that "Content-Disposition" header in case of "attachment" type should include
|
||||||
// "filename" part. See MNT-9900
|
// "filename" part. See MNT-9900
|
||||||
String userAgent = req.getHeader(HEADER_USER_AGENT);
|
String userAgent = req.getHeader(HEADER_USER_AGENT);
|
||||||
if (userAgent != null && userAgent.toLowerCase().contains("msie"))
|
if (userAgent != null && (userAgent.toLowerCase().contains("firefox") || userAgent.toLowerCase().contains("safari")))
|
||||||
{
|
|
||||||
res.setHeader(HEADER_CONTENT_DISPOSITION, "attachment; filename=\"" + URLEncoder.encode(filename) + "\"");
|
|
||||||
}
|
|
||||||
else if (userAgent != null && (userAgent.toLowerCase().contains("firefox") || userAgent.toLowerCase().contains("safari")))
|
|
||||||
{
|
{
|
||||||
res.setHeader(HEADER_CONTENT_DISPOSITION, "attachment; filename=\"" + URLDecoder.decode(filename) + "\"");
|
res.setHeader(HEADER_CONTENT_DISPOSITION, "attachment; filename=\"" + URLDecoder.decode(filename) + "\"");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user