[HTTPCLIENT-1714] Add HttpClientBuilder.setDnsResolver(DnsResolver).
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.5.x@1726729 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1d50c1a1a1
commit
3a9a452730
|
@ -1,3 +1,18 @@
|
|||
Release 4.5.2
|
||||
-------------------
|
||||
|
||||
HttpClient 4.5.2 (GA) is a maintenance release that fixes a number of minor defects found since 4.5.1.
|
||||
|
||||
Please note that as of 4.4 HttpClient requires Java 1.6 or newer.
|
||||
|
||||
Changelog:
|
||||
-------------------
|
||||
|
||||
* [HTTPCLIENT-1714] Add HttpClientBuilder.setDnsResolver(DnsResolver).
|
||||
Contributed by Alexis Thaveau <alexis.thaveau at gmail.com>
|
||||
|
||||
|
||||
|
||||
Release 4.5.1
|
||||
-------------------
|
||||
|
||||
|
|
|
@ -74,6 +74,7 @@ import org.apache.http.config.Lookup;
|
|||
import org.apache.http.config.RegistryBuilder;
|
||||
import org.apache.http.config.SocketConfig;
|
||||
import org.apache.http.conn.ConnectionKeepAliveStrategy;
|
||||
import org.apache.http.conn.DnsResolver;
|
||||
import org.apache.http.conn.HttpClientConnectionManager;
|
||||
import org.apache.http.conn.SchemePortResolver;
|
||||
import org.apache.http.conn.routing.HttpRoutePlanner;
|
||||
|
@ -168,6 +169,7 @@ public class HttpClientBuilder {
|
|||
private AuthenticationStrategy proxyAuthStrategy;
|
||||
private UserTokenHandler userTokenHandler;
|
||||
private HttpProcessor httpprocessor;
|
||||
private DnsResolver dnsResolver;
|
||||
|
||||
private LinkedList<HttpRequestInterceptor> requestFirst;
|
||||
private LinkedList<HttpRequestInterceptor> requestLast;
|
||||
|
@ -610,6 +612,16 @@ public class HttpClientBuilder {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns {@link DnsResolver} instance.
|
||||
* <p/>
|
||||
* Please note this value can be overridden by the {@link #setConnectionManager(HttpClientConnectionManager)} method.
|
||||
*/
|
||||
public final HttpClientBuilder setDnsResolver(final DnsResolver dnsResolver) {
|
||||
this.dnsResolver = dnsResolver;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns {@link HttpRequestRetryHandler} instance.
|
||||
* <p>
|
||||
|
@ -965,7 +977,7 @@ public class HttpClientBuilder {
|
|||
.build(),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
dnsResolver,
|
||||
connTimeToLive,
|
||||
connTimeToLiveTimeUnit != null ? connTimeToLiveTimeUnit : TimeUnit.MILLISECONDS);
|
||||
if (defaultSocketConfig != null) {
|
||||
|
|
Loading…
Reference in New Issue