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

Peter Bryant commented on HTTPCLIENT-1536:
------------------------------------------

Would you please consider this patch as well:
https://github.com/pbkwee/httpcore/commit/696baadb8b03428f9e12f24225ecd0ae45118788

This ensures that the HttpHost#getHostName matches the InetAddress#getHostName 
(rather than its getHostAddress (ip address)).

> 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
>              Labels: easyfix
>             Fix For: 4.3.6, 4.4 Alpha2
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to