Tobias Bergman created HTTPCLIENT-1994:
------------------------------------------
Summary: Invalid URI rewrite of encoded '+'
Key: HTTPCLIENT-1994
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1994
Project: HttpComponents HttpClient
Issue Type: Bug
Affects Versions: 4.5.9, 4.5.8, 4.5.7
Reporter: Tobias Bergman
I have a unit test that test sending path parameters to a REST server with this
URI:
{code:java}
String encoded =
URLEncoder.encode("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÅåÄäÖö!\\\"#$%&'()*+,-./
0123456789:;<=>?Ⴉガ倚\ud834\udd1e", "UTF-8");
URI uri = URI.create("http://localhost/Param1Value/" + encoded +
"/test?cde=456&abc=%7B1%232%253%7D");
{code}
But this test fails when using HttpClient 4.5.7+:
{noformat}
Caused by: java.lang.AssertionError: expected
[AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÅåÄäÖö!\"#$%&'()*+,-./
0123456789:;<=>?Ⴉガ倚??] but found
[AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÅåÄäÖö!\"#$%&'()* ,-./
0123456789:;<=>?Ⴉガ倚??]
{noformat}
The '+' sign is converted into a space.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]