﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
426	Ticket Download, file names encoded IE 11	Trevor.Anderson		"Using Community LogicalDoc 6.8.3;
When downloading documents using ""Send as Document Ticket"" emails via IE 11 the 'Content-Disposition' header syntax appears to be incorrect.
Looking at TicketDownload.java of component 'logicaldoc-webapp' the 'SetContentDisposition' function does not support IE11 because User-agent string no longer contains ""MSIE"". Using the work around found else where in the full project source testing for ""Trident"" and ""Windows"" a workaround was created that worked for me, and I wanted to highlight and share with the valuable contributors and authors of this fantastic product.
{{{
#!div style=""font-size: 80%""
Work around used:
  {{{#!java
        /**
         * Sets the correct Content-Disposition header into the response
         */
        private static void setContentDisposition(HttpServletRequest request, HttpServletResponse response, String filename)
                        throws UnsupportedEncodingException {
                // Encode the filename
                String userAgent = request.getHeader(""User-Agent"");
                String encodedFileName = null;
                if (userAgent.contains(""MSIE"") || userAgent.contains(""Opera"") || userAgent.contains(""Safari"") || (userAgent.contains(""Trident"") && userAgent.contains(""Windows""))){
                        encodedFileName = URLEncoder.encode(filename, ""UTF-8"");
                        encodedFileName = encodedFileName.replace(""+"", ""%20"");
                } else {
                        encodedFileName = ""=?UTF-8?B?"" + new String(Base64.encodeBase64(filename.getBytes(""UTF-8"")), ""UTF-8"")
                                        + ""?="";
                }
                response.setHeader(""Content-Disposition"", ""attachment; filename=\"""" + encodedFileName + ""\"""");
        }

  }}}
}}}
{{{#!comment
Please forgive me, should I do something wrong here as this is 
my first time at any such activity.}}}"	improvement	closed	minor	6.8.4	Core	6.8.3	fixed		
