Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5071383B4 for ; Mon, 5 Sep 2011 19:12:18 +0000 (UTC) Received: (qmail 10783 invoked by uid 500); 5 Sep 2011 19:12:18 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 10736 invoked by uid 500); 5 Sep 2011 19:12:17 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 10727 invoked by uid 99); 5 Sep 2011 19:12:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2011 19:12:16 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alinachegalati@gmail.com designates 74.125.82.179 as permitted sender) Received: from [74.125.82.179] (HELO mail-wy0-f179.google.com) (74.125.82.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2011 19:12:10 +0000 Received: by wyh21 with SMTP id 21so3731903wyh.10 for ; Mon, 05 Sep 2011 12:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=juaVTdj6u4mg13lfBaHm5cCOqF5k2gar74rmxAbf460=; b=sHgUhBEYVr+36WixiVcaA2xw8Ux7WIjyX96eNsO9jAKkBnuxxyEVa8saZQnLgzx+rC UvSVFOGTQYx4Qa0gOhxjUJCf3luj520HTH/W88u8GViihiPKfwT62VTh4zS89PCX0EY1 lIKPnYo2rpu938ymo6RnOn7Yewf8BH22LOTV4= MIME-Version: 1.0 Received: by 10.216.221.83 with SMTP id q61mr2720689wep.57.1315249910572; Mon, 05 Sep 2011 12:11:50 -0700 (PDT) Received: by 10.216.47.5 with HTTP; Mon, 5 Sep 2011 12:11:50 -0700 (PDT) In-Reply-To: <230469967.17854.1315249332133.JavaMail.tomcat@hel.zones.apache.org> References: <1723311659.11785.1314990909820.JavaMail.tomcat@hel.zones.apache.org> <230469967.17854.1315249332133.JavaMail.tomcat@hel.zones.apache.org> Date: Mon, 5 Sep 2011 22:11:50 +0300 Message-ID: Subject: Re: [jira] [Commented] (HTTPCLIENT-1123) Implement a way to override or resolve DNS entries defined in the OS From: Vasile Alin To: HttpComponents Project Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org This is a good idea in this way we favour exceptions instead of custom returns such as null. On 5 September 2011 22:02, Oleg Kalnichevski (JIRA) wrote= : > > =A0 =A0[ https://issues.apache.org/jira/browse/HTTPCLIENT-1123?page=3Dcom= .atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommen= tId=3D13097254#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 add= ress could not be resolved instead of returning null. Individual implementa= tions may choose to fall back onto InetAddress#getAllByName when appropriat= e or signal failure to resolve the hostname by throwing UnknownHostExceptio= n. > --- > public interface DnsResolver { > > =A0 =A0InetAddress[] resolve(String host) throws UnknownHostException; > > } > --- > What do you think? > > Oleg > >> Implement a way to override or resolve DNS entries defined in the OS >> -------------------------------------------------------------------- >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Key: HTTPCLIENT-1123 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 URL: https://issues.apache.org/jira/brow= se/HTTPCLIENT-1123 >> =A0 =A0 =A0 =A0 =A0 =A0 Project: HttpComponents HttpClient >> =A0 =A0 =A0 =A0 =A0Issue Type: New Feature >> =A0 =A0 =A0 =A0 =A0Components: HttpClient >> =A0 =A0 =A0 =A0 =A0 =A0Reporter: Alin Vasile >> =A0 =A0 =A0 =A0 =A0 =A0Priority: Minor >> =A0 =A0 =A0 =A0 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 DN= S 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 th= e 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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org