myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gcrawf...@apache.org
Subject svn commit: r1583845 - /myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/FileDownloadActionListener.java
Date Wed, 02 Apr 2014 01:07:39 GMT
Author: gcrawford
Date: Wed Apr  2 01:07:39 2014
New Revision: 1583845

URL: http://svn.apache.org/r1583845
Log:
TRINIDAD-2466
FileDownLoadActionListener does not work with filenames with special characters on IE11

thanks to kentaro

Modified:
    myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/FileDownloadActionListener.java

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/FileDownloadActionListener.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/FileDownloadActionListener.java?rev=1583845&r1=1583844&r2=1583845&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/FileDownloadActionListener.java
(original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/FileDownloadActionListener.java
Wed Apr  2 01:07:39 2014
@@ -104,10 +104,12 @@ public class FileDownloadActionListener 
         {
           // check for supported user agents. Currently IE, Gecko, and WebKit.
           // IE and WebKit use UTF-8 encoding.
+          // IE11 UA String uses trident
           boolean isGecko = true;
           Map<String, String> headers = context.getExternalContext().getRequestHeaderMap();
           String agentName = headers.get("User-Agent").toLowerCase();
-          if (agentName.contains("msie") || agentName.contains("applewebkit") || agentName.contains("safari"))
+          if (agentName.contains("msie") || agentName.contains("applewebkit") || agentName.contains("safari")
|| 
+              agentName.contains("trident"))
             isGecko = false;
           // boolean isIE = CoreRenderer.isIE(RenderingContext.getCurrentInstance());
           String encodeHTTPHeaderFilename = MimeUtility.encodeHTTPHeader(filename, !isGecko);



Mime
View raw message