[
https://issues.apache.org/jira/browse/HTTPCLIENT-1982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16812798#comment-16812798
]
Oleg Kalnichevski commented on HTTPCLIENT-1982:
-----------------------------------------------
[~pozhidaevak] You are mixing up the path and query elements. HttpClient
correctly normalizes the path component while preserving the escaped reserved
characters in the query component.
{code:java}
URI uri = new URI("https://www.example.com/blah%3Dblah?par1=blah%3Dblah");
System.out.println(URIUtils.rewriteURI(uri, new HttpHost("www.example.com", -1,
"https"), URIUtils.NORMALIZE));
{code}
{noformat}
https://www.example.com/blah=blah?par1=blah%3Dblah
{noformat}
Oleg
> Encoded equals(=) are not preservered
> -------------------------------------
>
> Key: HTTPCLIENT-1982
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1982
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Affects Versions: 4.5.8
> Reporter: Anton Pozhidaev
> Priority: Major
>
> This issue is very similar to HTTPCLIENT-1968.
> But instead of encoded slash, it affects encoded equals (%3D).
> Encoded equals are decoded back in URL ( "%3D" => "=") *only if normalization
> is set to true*.
> However, I believe this is shouldn't be part of normalization.
> The issue is happening somewhere inside URIBuilder.setPathSegments() which is
> called from
> `rewriteURI(URI uri, HttpHost target, EnumSet<URIUtils.UriFlag> flags)` line
> 103
> PS. If the issue will be acknowledged as valid one I can try to prepare PR :)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]