You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by se...@apache.org on 2008/04/29 23:33:59 UTC

svn commit: r652153 - /httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java

Author: sebb
Date: Tue Apr 29 14:33:59 2008
New Revision: 652153

URL: http://svn.apache.org/viewvc?rev=652153&view=rev
Log:
Ensure correct socket variable is used; rename sslock => sslsock

Modified:
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java?rev=652153&r1=652152&r2=652153&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java (original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java Tue Apr 29 14:33:59 2008
@@ -272,7 +272,7 @@
             throw new IllegalArgumentException("Parameters may not be null.");
         }
 
-        SSLSocket sslock = (SSLSocket)
+        SSLSocket sslsock = (SSLSocket)
             ((sock != null) ? sock : createSocket());
 
         if ((localAddress != null) || (localPort > 0)) {
@@ -283,25 +283,25 @@
 
             InetSocketAddress isa =
                 new InetSocketAddress(localAddress, localPort);
-            sslock.bind(isa);
+            sslsock.bind(isa);
         }
 
         int connTimeout = HttpConnectionParams.getConnectionTimeout(params);
         int soTimeout = HttpConnectionParams.getSoTimeout(params);
 
-        sock.connect(new InetSocketAddress(host, port), connTimeout);
+        sslsock.connect(new InetSocketAddress(host, port), connTimeout);
 
-        sslock.setSoTimeout(soTimeout);
+        sslsock.setSoTimeout(soTimeout);
         try {
-            hostnameVerifier.verify(host, sslock);
+            hostnameVerifier.verify(host, sslsock);
             // verifyHostName() didn't blowup - good!
         } catch (IOException iox) {
             // close the socket before re-throwing the exception
-            try { sslock.close(); } catch (Exception x) { /*ignore*/ }
+            try { sslsock.close(); } catch (Exception x) { /*ignore*/ }
             throw iox;
         }
 
-        return sslock;
+        return sslsock;
     }