hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1726729 - in /httpcomponents/httpclient/branches/4.5.x: RELEASE_NOTES.txt httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
Date Tue, 26 Jan 2016 05:12:28 GMT
Author: ggregory
Date: Tue Jan 26 05:12:27 2016
New Revision: 1726729

URL: http://svn.apache.org/viewvc?rev=1726729&view=rev
Log:
[HTTPCLIENT-1714] Add HttpClientBuilder.setDnsResolver(DnsResolver).

Modified:
    httpcomponents/httpclient/branches/4.5.x/RELEASE_NOTES.txt
    httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java

Modified: httpcomponents/httpclient/branches/4.5.x/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/RELEASE_NOTES.txt?rev=1726729&r1=1726728&r2=1726729&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/branches/4.5.x/RELEASE_NOTES.txt Tue Jan 26 05:12:27 2016
@@ -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
 -------------------
 

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java?rev=1726729&r1=1726728&r2=1726729&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
(original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
Tue Jan 26 05:12:27 2016
@@ -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;
@@ -611,6 +613,16 @@ public class HttpClientBuilder {
     }
 
     /**
+     * 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>
      * Please note this value can be overridden by the {@link #disableAutomaticRetries()}
@@ -965,7 +977,7 @@ public class HttpClientBuilder {
                         .build(),
                     null,
                     null,
-                    null,
+                    dnsResolver,
                     connTimeToLive,
                     connTimeToLiveTimeUnit != null ? connTimeToLiveTimeUnit : TimeUnit.MILLISECONDS);
             if (defaultSocketConfig != null) {



Mime
View raw message