Need to decode class.getResource() URL using "url-encoded" as opposed to
"x-www-form-urlencoded" encoding
---------------------------------------------------------------------------------------------------------
Key: LAUNCHER-10
URL: https://issues.apache.org/jira/browse/LAUNCHER-10
Project: Commons Launcher
Issue Type: Bug
Affects Versions: 1.1
Environment: Any, particulary Mac OSX 10.5
Reporter: Haughton Mifflin Harcourt Publishing
Class.getResource returns a url-encoded(as opposed to x-www-form-urlencoded)
URL object.
This causes problems where file paths contain '+'s. Decoding as
"x-www-form-urlencoded" assumes the '+' translates to a space character.
However, the File URL is actually "url-encoded" not "x-www-form-urlencoded", so
spaces are actually encoded as '%20' rather than '+'
Need to decode the URL using url-encoded as opposed to x-www-form-urlencoded
encoding
Java's URLDecoder only supports x-www-form-urlencoded
Use JDK's URI class to do the decoding.
Have implemented a fix and patch file to follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.