You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Daniil Tsaryov (JIRA)" <ji...@apache.org> on 2019/06/24 10:57:00 UTC
[jira] [Comment Edited] (HTTPCLIENT-1996) Cyrillic characters are
incorrectly encoded
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16871062#comment-16871062 ]
Daniil Tsaryov edited comment on HTTPCLIENT-1996 at 6/24/19 10:56 AM:
----------------------------------------------------------------------
[~olegk],
Could you clarify why it was working OK in 4.5.6?
Regards,
Daniil
was (Author: dtsaryov):
[~olegk],
Could you clarify what it was working OK in 4.5.6?
Regards,
Daniil
> Cyrillic characters are incorrectly encoded
> -------------------------------------------
>
> Key: HTTPCLIENT-1996
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1996
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Affects Versions: 4.5.8
> Reporter: Daniil Tsaryov
> Priority: Major
> Attachments: httpclient-cyrillic.zip
>
>
> Starting with version 4.5.8 URIUtils.rewriteUri encodes Cyrillic characters in the wrong way.
> Consider the following test:
> {code:java}
> String src = "http://www.яндекс.рф/тестовый-адрес";
> URI srcUri = new URL(src).toURI();
> String targetPath = "http://localhost:8080/тестовый-адрес";
> HttpHost targetHost = new HttpHost("localhost", 8080, "http");
> URI targetUri = URIUtils.rewriteURI(srcUri, targetHost);
> Assert.assertEquals(targetPath, targetUri.toString());
> {code}
> As a result:
> {code:java}
> Expected :http://localhost:8080/тестовый-адрес
> Actual :http://localhost:8080/B5AB%3E2K9-04@5A
> {code}
> Please check demo project in attachments
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org