[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529525
 ] 

Christopher Sahnwaldt commented on HTTPCLIENT-691:
--------------------------------------------------

With another small change in HttpHost, I managed to invoke a GetMethod:

line 107 of current SVN version:

this(uri.getHost(), uri.getPort(), Protocol.getProtocol(uri.getScheme()));

change to

this(new String(uri.getRawHost()), uri.getPort(), 
Protocol.getProtocol(uri.getScheme()));

This is just a hack though; for a clean solution a method getEscapedHost() 
should be added to URI.

When I tested this, HttpClient tried to create a Socket and got an 
UnknownHostException for hosts with non-ASCII characters. I don't know if that 
is Java's fault, or maybe our DNS is not configured correctly, but at least 
that's the same result I get with java.net.URL.openStream() :-)


> URI does not handle non-ASCII characters in host names correctly
> ----------------------------------------------------------------
>
>                 Key: HTTPCLIENT-691
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-691
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>            Reporter: Christopher Sahnwaldt
>            Priority: Minor
>
> URI uri = new URI("http://www.eisbär.de/eisbär?eis=bär";, false);
> System.out.println(uri.getHost());
> System.out.println(uri.getPath());
> System.out.println(uri.getQuery());
> prints
> www.eisb?r.de
> /eisbär
> eis=bär

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to