[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPCLIENT-1473.
-------------------------------------------

    Resolution: Cannot Reproduce

The code snippet below causes UnknownHostException, which is as far as I am 
concerned is the expected behavior.

Oleg

{code:java}
HttpResponse response = Executor.newInstance(HttpClients.createDefault())
        .execute(Request.Get("http://google.com/";)
                .connectTimeout(5000)
                .viaProxy(new HttpHost("somewhere-in-pampa", 8080)))
        .returnResponse();
{code}
{noformat}
Exception in thread "main" java.net.UnknownHostException: somewhere-in-pampa: 
Name or service not known
        at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
        at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:894)
        at 
java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1286)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1239)
        at java.net.InetAddress.getAllByName(InetAddress.java:1155)
        at java.net.InetAddress.getAllByName(InetAddress.java:1091)
        at 
org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:44)
        at 
org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:102)
        at 
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
        at 
org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:371)
        at 
org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
        at 
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85)
        at 
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
        at 
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
        at 
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at 
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
        at org.apache.http.client.fluent.Executor.execute(Executor.java:207)
{noformat}


> Http get via invalid proxy get 200/OK instead of 500
> ----------------------------------------------------
>
>                 Key: HTTPCLIENT-1473
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1473
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Fluent HC
>    Affects Versions: 4.3 Final, 4.3.1, 4.3.3
>            Reporter: guy hanael
>
> HttpResponse response = Executor.newInstance(new 
> DefaultHttpClient(connectionManager))
>           .execute(Request.Get(url)
>           .connectTimeout(5000)
>           .viaProxy(new HttpHost(proxyHost, proxyPort)))
>           .returnResponse();
> Works until 4.2.6 does not work from 4.3.X



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to