hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Bryant (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPCLIENT-1536) HttpClientConnectionOperator should use HttpHost.getAddress if available
Date Tue, 05 Aug 2014 03:04:13 GMT
Peter Bryant created HTTPCLIENT-1536:
----------------------------------------

             Summary: HttpClientConnectionOperator should use HttpHost.getAddress if available
                 Key: HTTPCLIENT-1536
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1536
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient
    Affects Versions: 4.3.4
            Reporter: Peter Bryant


In HttpClientConnectionOperator Instead of:

final InetAddress[] addresses = this.dnsResolver.resolve(host.getHostName());

Use:
InetAddress explicit = target.getAddress();
final InetAddress[] addresses = explicit!=null ? new InetAddress[]{explicit} : this.dnsResolver.resolve(host.getHostName());

e.g. On a host with round-robin dns (mulitple A or AAAA records) I wish to connect to a specific
server rather than trying multiple hosts.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message