[ http://issues.apache.org/jira/browse/HTTPCLIENT-578?page=all ]
Oleg Kalnichevski updated HTTPCLIENT-578: ----------------------------------------- Bugzilla Id: (was: 39564) Fix Version: 3.1 Alpha 1 Assign To: Oleg Kalnichevski (was: HttpClient Dev) > literal plus (+) character in path components of HttpURL is not preserved. > -------------------------------------------------------------------------- > > Key: HTTPCLIENT-578 > URL: http://issues.apache.org/jira/browse/HTTPCLIENT-578 > Project: Jakarta HttpClient > Type: Bug > Components: HttpClient > Versions: 3.0.1 > Environment: Operating System: other > Platform: Other > Reporter: Jeremy Norris > Assignee: Oleg Kalnichevski > Fix For: 3.1 Alpha 1 > Attachments: path-plus.patch > > When a literal plus character is included in the path component of an URL, it > is > not encoded, but get decoded during getPath() to a space. > Reproducible with the following: > HttpURL httpURL = new HttpURL("http://localhost/test+test"); > System.out.println(httpURL.getPath()); > Output: > "test test" > The following path fixes the issue (This patch does not appear to break > anything > else): > Patch against SVN Repo: > URL: http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk > Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68 > Revision: 405803 > Index: src/java/org/apache/commons/httpclient/URI.java > =================================================================== > --- src/java/org/apache/commons/httpclient/URI.java (revision 405803) > +++ src/java/org/apache/commons/httpclient/URI.java (working copy) > @@ -1552,6 +1552,7 @@ > allowed_abs_path.or(abs_path); > // allowed_abs_path.set('/'); // aleady included > allowed_abs_path.andNot(percent); > + allowed_abs_path.clear('+'); > } > @@ -1563,6 +1564,7 @@ > static { > allowed_rel_path.or(rel_path); > allowed_rel_path.clear('%'); > + allowed_rel_path.clear('+'); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]