hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r160469 - in jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl: AbstractHttpConnection.java NIOProtocolSocketFactory.java
Date Thu, 07 Apr 2005 20:58:37 GMT
Author: olegk
Date: Thu Apr  7 13:58:36 2005
New Revision: 160469

URL: http://svn.apache.org/viewcvs?view=rev&rev=160469
Log:
Minor bug fixes

Modified:
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/AbstractHttpConnection.java
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/NIOProtocolSocketFactory.java

Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/AbstractHttpConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/AbstractHttpConnection.java?view=diff&r1=160468&r2=160469
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/AbstractHttpConnection.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/AbstractHttpConnection.java
Thu Apr  7 13:58:36 2005
@@ -77,6 +77,7 @@
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
         assertNotOpen();
+        this.socket = socket;
         HttpConnectionParams connParams = new HttpConnectionParams(params); 
         this.socket.setTcpNoDelay(connParams.getTcpNoDelay());
         this.socket.setSoTimeout(connParams.getSoTimeout());

Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/NIOProtocolSocketFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/NIOProtocolSocketFactory.java?view=diff&r1=160468&r2=160469
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/NIOProtocolSocketFactory.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/NIOProtocolSocketFactory.java
Thu Apr  7 13:58:36 2005
@@ -34,6 +34,7 @@
 import java.net.InetSocketAddress;
 import java.net.Socket;
 import java.net.UnknownHostException;
+import java.nio.channels.SocketChannel;
 
 import org.apache.http.ConnectTimeoutException;
 import org.apache.http.ProtocolSocketFactory;
@@ -99,7 +100,8 @@
         if (params == null) {
             throw new IllegalArgumentException("Parameters may not be null");
         }
-        Socket socket = new Socket();
+        SocketChannel channel = SocketChannel.open(); 
+        Socket socket = channel.socket();
         if (localAddress != null) {
             socket.bind(new InetSocketAddress(localAddress, localPort));
         }



Mime
View raw message