You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Benjamin Bentmann (JIRA)" <ji...@apache.org> on 2008/04/25 11:49:59 UTC
[jira] Created: (IO-166) Fix URL decoding in FileUtils.toFile()
Fix URL decoding in FileUtils.toFile()
--------------------------------------
Key: IO-166
URL: https://issues.apache.org/jira/browse/IO-166
Project: Commons IO
Issue Type: Bug
Components: Utilities
Affects Versions: 1.4
Reporter: Benjamin Bentmann
Priority: Minor
Attachments: IO-166.patch
The sequence "%2520" should decode to "%20".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (IO-166) Fix URL decoding in FileUtils.toFile()
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton resolved IO-166.
--------------------------------
Resolution: Fixed
Fixed, thanks for the patch:
http://svn.apache.org/viewvc?view=revision&revision=1002457
> Fix URL decoding in FileUtils.toFile()
> --------------------------------------
>
> Key: IO-166
> URL: https://issues.apache.org/jira/browse/IO-166
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 1.4
> Reporter: Benjamin Bentmann
> Priority: Minor
> Fix For: 2.0
>
> Attachments: IO-166.patch, IO-166.patch
>
>
> The sequence "%2520" should decode to "%20".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-166) Fix URL decoding in FileUtils.toFile()
Posted by "Benjamin Bentmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann updated IO-166:
---------------------------------
Attachment: IO-166.patch
> Fix URL decoding in FileUtils.toFile()
> --------------------------------------
>
> Key: IO-166
> URL: https://issues.apache.org/jira/browse/IO-166
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 1.4
> Reporter: Benjamin Bentmann
> Priority: Minor
> Attachments: IO-166.patch
>
>
> The sequence "%2520" should decode to "%20".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-166) Fix URL decoding in FileUtils.toFile()
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell updated IO-166:
-----------------------------
Fix Version/s: 1.5
> Fix URL decoding in FileUtils.toFile()
> --------------------------------------
>
> Key: IO-166
> URL: https://issues.apache.org/jira/browse/IO-166
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 1.4
> Reporter: Benjamin Bentmann
> Priority: Minor
> Fix For: 1.5
>
> Attachments: IO-166.patch, IO-166.patch
>
>
> The sequence "%2520" should decode to "%20".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-166) Fix URL decoding in FileUtils.toFile()
Posted by "Benjamin Bentmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann updated IO-166:
---------------------------------
Attachment: IO-166.patch
New patch to also address the following issues:
# URL decoding should use UTF-8
# URL decoding should be lenient
Rationale for 1. is to bring the method in sync with the behavior of the decoding done by the JDK, i.e. the output from
{code:java}
URI url = new URI("file:/home/%C3%A4%C3%B6%C3%BC%C3%9F");
System.out.println(new File(url));
System.out.println(FileUtils.toFile(url.toURL()));
{code}
is currently
{noformat}
/home/äöüß
/home/äöü�
{noformat}
Rationale for 2. is to better work with invalid URLs returned by bad class loaders. There are still enough class loader implementations out that will return a URL like "file:/<snip>/%file.txt" when queried for a resource named "%file.txt", i.e. the URL is not encoded at all and can as such potentially include literal percent characters. Hence I believe it is preferable for the method to simply pass such characters literally through instead of failing with an exception.
> Fix URL decoding in FileUtils.toFile()
> --------------------------------------
>
> Key: IO-166
> URL: https://issues.apache.org/jira/browse/IO-166
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 1.4
> Reporter: Benjamin Bentmann
> Priority: Minor
> Attachments: IO-166.patch, IO-166.patch
>
>
> The sequence "%2520" should decode to "%20".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.