hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1132902 - in /httpcomponents/httpclient/trunk: ./ httpclient/src/main/java/org/apache/http/conn/ httpclient/src/main/java/org/apache/http/conn/scheme/ httpclient/src/main/java/org/apache/http/conn/ssl/
Date Tue, 07 Jun 2011 08:25:24 GMT
Author: olegk
Date: Tue Jun  7 08:25:24 2011
New Revision: 1132902

URL: http://svn.apache.org/viewvc?rev=1132902&view=rev
Log:
HTTPCLIENT-1098: Avoid expensive reverse DNS lookup on connect timeout excpetion 
Contributed by Thomas Boettcher <tboett at gmail.com>

Modified:
    httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/HttpInetSocketAddress.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java

Modified: httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt?rev=1132902&r1=1132901&r2=1132902&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/trunk/RELEASE_NOTES.txt Tue Jun  7 08:25:24 2011
@@ -1,9 +1,14 @@
 Changes since 4.1.1
 
-* [HTTPCLIENT-1097] BrowserCompatHostnameVerifier and StrictHostnameVerifier should handle
wildcards in SSL certificates better.
+* [HTTPCLIENT-1098] Avoid expensive reverse DNS lookup on connect timeout exception. 
+  Contributed by Thomas Boettcher <tboett at gmail.com>
+
+* [HTTPCLIENT-1097] BrowserCompatHostnameVerifier and StrictHostnameVerifier should handle

+  wildcards in SSL certificates better.
   Contributed by Sebastian Bazley <sebb at apache.org>
 
-* [HTTPCLIENT-1092] If ClientPNames.VIRTUAL_HOST does not provide the port, derive it from
the current request.
+* [HTTPCLIENT-1092] If ClientPNames.VIRTUAL_HOST does not provide the port, derive it from
the 
+  current request.
   Contributed by Sebastian Bazley <sebb at apache.org>
 
 * [HTTPCLIENT-1087] NTLM proxy authentication fails on retry if the underlying connection
is closed

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/HttpInetSocketAddress.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/HttpInetSocketAddress.java?rev=1132902&r1=1132901&r2=1132902&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/HttpInetSocketAddress.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/HttpInetSocketAddress.java
Tue Jun  7 08:25:24 2011
@@ -54,5 +54,11 @@ public class HttpInetSocketAddress exten
     public HttpHost getHost() {
         return this.host;
     }
+
+    @Override
+    public String toString() {
+        return this.host.getHostName() + ":" + getPort();
+    }
+
     
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java?rev=1132902&r1=1132901&r2=1132902&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
Tue Jun  7 08:25:24 2011
@@ -122,8 +122,7 @@ public class PlainSocketFactory implemen
             sock.setSoTimeout(soTimeout);
             sock.connect(remoteAddress, connTimeout);
         } catch (SocketTimeoutException ex) {
-            throw new ConnectTimeoutException("Connect to " + remoteAddress.getHostName()
+ "/"
-                    + remoteAddress.getAddress() + " timed out");
+            throw new ConnectTimeoutException("Connect to " + remoteAddress + " timed out");
         }
         return sock;
     }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java?rev=1132902&r1=1132901&r2=1132902&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
Tue Jun  7 08:25:24 2011
@@ -375,8 +375,7 @@ public class SSLSocketFactory implements
             sock.setSoTimeout(soTimeout);
             sock.connect(remoteAddress, connTimeout);
         } catch (SocketTimeoutException ex) {
-            throw new ConnectTimeoutException("Connect to " + remoteAddress.getHostName()
+ "/"
-                    + remoteAddress.getAddress() + " timed out");
+            throw new ConnectTimeoutException("Connect to " + remoteAddress + " timed out");
         }
         SSLSocket sslsock;
         // Setup SSL layering if necessary



Mime
View raw message