You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2019/06/24 09:15:00 UTC
[jira] [Resolved] (HTTPCLIENT-1996) Cyrillic characters are
incorrectly encoded
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski resolved HTTPCLIENT-1996.
-------------------------------------------
Resolution: Invalid
> 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