You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org> on 2014/07/02 19:33:25 UTC

[jira] [Updated] (TRINIDAD-2489) Incorrect filename displayed in Chrome while using FILEDOWNLOADACTIONLISTENER

     [ https://issues.apache.org/jira/browse/TRINIDAD-2489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeanne Waldman updated TRINIDAD-2489:
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.1-core
         Assignee: Jeanne Waldman
           Status: Resolved  (was: Patch Available)

fixed on trunk

> Incorrect filename displayed in Chrome while using FILEDOWNLOADACTIONLISTENER
> -----------------------------------------------------------------------------
>
>                 Key: TRINIDAD-2489
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2489
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>            Reporter: Naizam Olakara
>            Assignee: Jeanne Waldman
>            Priority: Minor
>             Fix For: 2.1.1-core
>
>         Attachments: trunk.patch
>
>
> When using the fileDownloadActionListener, if the filename has a comma (",")
> chrome will show the comma as "%2C". Firefox and IE work fine.
> Create a page with filedownload action listener like below
> <tr:commandLink immediate="true" text="Command Link">
>     <tr:fileDownloadActionListener contentType="text/plain" filename="526,1.zip" method="#{fileDownload.sendHelloFile}"/>
> </tr:commandLink>
> Sample file name is, "526,1.zip"
> In firefox and IE, the filename will be displayed as "526,1.zip". In chrome it will be "526%2C1.zip". 
> Fix:-
> src\main\java\org\apache\myfaces\trinidadinternal\taglib\listener\FileDownloadActionListener.java
> Here, the filename is encoded differently based on browsers. Currently IE and all webkit browsers has UTF-8 URL encoding and others (gecko) have UTF-8 quoted-printable encoding. Chrome also needs UTF-8 quoted-printable encoding. A check is added to handle this case.



--
This message was sent by Atlassian JIRA
(v6.2#6252)