hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1123) Implement a way to override or resolve DNS entries defined in the OS
Date Mon, 05 Sep 2011 19:02:12 GMT

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

Oleg Kalnichevski commented on HTTPCLIENT-1123:
-----------------------------------------------

Almost there. I think it would be better if the DnsResolver was always to resolve hostname
to an address or throw an UnknownHostException if the address could not be resolved instead
of returning null. Individual implementations may choose to fall back onto InetAddress#getAllByName
when appropriate or signal failure to resolve the hostname by throwing UnknownHostException.
---
public interface DnsResolver {

    InetAddress[] resolve(String host) throws UnknownHostException;

}
---
What do you think?

Oleg

> Implement a way to override or resolve DNS entries defined in the OS
> --------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1123
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1123
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>          Components: HttpClient
>            Reporter: Alin Vasile
>            Priority: Minor
>         Attachments: dns_overrider_poc.patch, dns_overrider_poc.patch, dns_resolver.patch,
dns_resolver.patch
>
>
> When working with HttpClient in restrictive environments, where the user doesn't have
the permissisions to edit the local /etc/hosts file or the DNS configuration, can be eased
with an DNS Overrider capability. 
> This can be useful with JMeter which can follow redirects automatically and resolve some
of the redirected hosts against its configuration. Another example is a custom forward proxy,
written in Java and based on httpclient, which can be deployed is such a restricted environment
that would ease the development of various web solutions for some developers. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message