You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2009/02/06 22:35:05 UTC
svn commit: r741740 -
/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalReverseProxy.java
Author: olegk
Date: Fri Feb 6 21:35:05 2009
New Revision: 741740
URL: http://svn.apache.org/viewvc?rev=741740&view=rev
Log:
Removed java 1.3 incompatible method calls
Modified:
httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalReverseProxy.java
Modified: httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalReverseProxy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalReverseProxy.java?rev=741740&r1=741739&r2=741740&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalReverseProxy.java (original)
+++ httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalReverseProxy.java Fri Feb 6 21:35:05 2009
@@ -33,7 +33,6 @@
import java.io.IOException;
import java.io.InterruptedIOException;
-import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
@@ -167,7 +166,7 @@
System.out.println("<< Response: " + response.getStatusLine());
boolean keepalive = this.connStrategy.keepAlive(response, context);
- context.setAttribute(HTTP_CONN_KEEPALIVE, Boolean.valueOf(keepalive));
+ context.setAttribute(HTTP_CONN_KEEPALIVE, new Boolean(keepalive));
}
}
@@ -235,13 +234,7 @@
inconn.bind(insocket, this.params);
// Set up outgoing HTTP connection
- Socket outsocket = new Socket();
-
- int timeout = this.params.getIntParameter(
- CoreConnectionPNames.CONNECTION_TIMEOUT, 0);
- outsocket.connect(new InetSocketAddress(
- this.target.getHostName(), this.target.getPort()), timeout);
-
+ Socket outsocket = new Socket(this.target.getHostName(), this.target.getPort());
DefaultHttpClientConnection outconn = new DefaultHttpClientConnection();
outconn.bind(outsocket, this.params);
System.out.println("Outgoing connection to " + outsocket.getInetAddress());