mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix to remove ISO encoding from attached filenames - no longer requried now URL encoding is used for filenames
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3024 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,13 +19,11 @@ package org.alfresco.web.app.servlet;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
import java.net.URLDecoder;
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServlet;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
@@ -173,8 +171,7 @@ public class DownloadContentServlet extends BaseServlet
|
|||||||
{
|
{
|
||||||
// set header based on filename - will force a Save As from the browse if it doesn't recognise it
|
// set header based on filename - will force a Save As from the browse if it doesn't recognise it
|
||||||
// this is better than the default response of the browser trying to display the contents
|
// this is better than the default response of the browser trying to display the contents
|
||||||
String encname = filename.replace('%', '=');
|
res.setHeader("Content-Disposition", "attachment");
|
||||||
res.setHeader("Content-Disposition", "attachment;filename=\"=?ISO-8859-1?Q?" + encname + "?=\"");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the content reader
|
// get the content reader
|
||||||
|
Reference in New Issue
Block a user