myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naizam Olakara (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Updated] (TRINIDAD-2489) Incorrect filename displayed in Chrome while using FILEDOWNLOADACTIONLISTENER
Date Thu, 26 Jun 2014 22:27:24 GMT

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

Naizam Olakara updated TRINIDAD-2489:
-------------------------------------

    Status: Patch Available  (was: Open)

> 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
>            Priority: Minor
>         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)

Mime
View raw message