From 9ce698c4d5da1eaa8d1bc64838bb7ed26052ffc4 Mon Sep 17 00:00:00 2001 From: Roland Weber Date: Sun, 11 Feb 2007 11:33:30 +0000 Subject: [PATCH] HTTPCORE-40 git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@505895 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/http/examples/client/ClientExecuteDirect.java | 4 ++-- .../org/apache/http/examples/client/ClientExecuteProxy.java | 4 ++-- .../org/apache/http/examples/conn/ManagerConnectDirect.java | 4 ++-- .../org/apache/http/examples/conn/ManagerConnectProxy.java | 4 ++-- .../apache/http/examples/conn/OperatorConnectDirect.java | 4 ++-- .../org/apache/http/examples/conn/OperatorConnectProxy.java | 4 ++-- .../http/impl/conn/MultiThreadedHttpConnectionManager.java | 4 ++-- .../apache/http/impl/conn/SimpleHttpConnectionManager.java | 4 ++-- .../apache/http/impl/conn/ThreadSafeClientConnManager.java | 4 ++-- src/test/org/apache/http/conn/ssl/TestSSLSocketFactory.java | 4 ++-- src/test/org/apache/http/cookie/TestCookiePolicy.java | 4 ++-- .../impl/client/TestDefaultResponseConsumedWatcher.java | 6 +++--- 12 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/examples/org/apache/http/examples/client/ClientExecuteDirect.java b/src/examples/org/apache/http/examples/client/ClientExecuteDirect.java index 7109a8ec8..f174a4c21 100644 --- a/src/examples/org/apache/http/examples/client/ClientExecuteDirect.java +++ b/src/examples/org/apache/http/examples/client/ClientExecuteDirect.java @@ -40,7 +40,7 @@ import org.apache.http.HttpVersion; import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.protocol.BasicHttpProcessor; import org.apache.http.protocol.RequestConnControl; import org.apache.http.protocol.RequestContent; @@ -160,7 +160,7 @@ public class ClientExecuteDirect { supportedSchemes.register(new Scheme("http", sf, 80)); // prepare parameters - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, "UTF-8"); HttpProtocolParams.setUserAgent(params, "Jakarta-HttpClient/4.0"); diff --git a/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java b/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java index 013cb08e1..86e40afd7 100644 --- a/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java +++ b/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java @@ -40,7 +40,7 @@ import org.apache.http.HttpVersion; import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.protocol.BasicHttpProcessor; import org.apache.http.protocol.RequestConnControl; import org.apache.http.protocol.RequestContent; @@ -174,7 +174,7 @@ public class ClientExecuteProxy { supportedSchemes.register(new Scheme("https", sf, 80)); // prepare parameters - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, "UTF-8"); HttpProtocolParams.setUserAgent(params, "Jakarta-HttpClient/4.0"); diff --git a/src/examples/org/apache/http/examples/conn/ManagerConnectDirect.java b/src/examples/org/apache/http/examples/conn/ManagerConnectDirect.java index 59e1448fc..bdec9c64f 100644 --- a/src/examples/org/apache/http/examples/conn/ManagerConnectDirect.java +++ b/src/examples/org/apache/http/examples/conn/ManagerConnectDirect.java @@ -40,7 +40,7 @@ import org.apache.http.HttpVersion; import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpExecutionContext; @@ -178,7 +178,7 @@ public class ManagerConnectDirect { // Prepare parameters. // Since this example doesn't use the full core framework, // only few parameters are actually required. - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setUseExpectContinue(params, false); defaultParameters = params; diff --git a/src/examples/org/apache/http/examples/conn/ManagerConnectProxy.java b/src/examples/org/apache/http/examples/conn/ManagerConnectProxy.java index d6f345cca..fb8343009 100644 --- a/src/examples/org/apache/http/examples/conn/ManagerConnectProxy.java +++ b/src/examples/org/apache/http/examples/conn/ManagerConnectProxy.java @@ -40,7 +40,7 @@ import org.apache.http.HttpVersion; import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpExecutionContext; @@ -208,7 +208,7 @@ public class ManagerConnectProxy { // Prepare parameters. // Since this example doesn't use the full core framework, // only few parameters are actually required. - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setUseExpectContinue(params, false); defaultParameters = params; diff --git a/src/examples/org/apache/http/examples/conn/OperatorConnectDirect.java b/src/examples/org/apache/http/examples/conn/OperatorConnectDirect.java index 08bdcddb3..966c45a6e 100644 --- a/src/examples/org/apache/http/examples/conn/OperatorConnectDirect.java +++ b/src/examples/org/apache/http/examples/conn/OperatorConnectDirect.java @@ -40,7 +40,7 @@ import org.apache.http.HttpVersion; import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpExecutionContext; @@ -153,7 +153,7 @@ public class OperatorConnectDirect { // Prepare parameters. // Since this example doesn't use the full core framework, // only few parameters are actually required. - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setUseExpectContinue(params, false); defaultParameters = params; diff --git a/src/examples/org/apache/http/examples/conn/OperatorConnectProxy.java b/src/examples/org/apache/http/examples/conn/OperatorConnectProxy.java index d1a325dde..635c61ec9 100644 --- a/src/examples/org/apache/http/examples/conn/OperatorConnectProxy.java +++ b/src/examples/org/apache/http/examples/conn/OperatorConnectProxy.java @@ -40,7 +40,7 @@ import org.apache.http.HttpVersion; import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpExecutionContext; @@ -187,7 +187,7 @@ public class OperatorConnectProxy { // Prepare parameters. // Since this example doesn't use the full core framework, // only few parameters are actually required. - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setUseExpectContinue(params, false); defaultParameters = params; diff --git a/src/java/org/apache/http/impl/conn/MultiThreadedHttpConnectionManager.java b/src/java/org/apache/http/impl/conn/MultiThreadedHttpConnectionManager.java index 4319364b1..78b0aa5df 100644 --- a/src/java/org/apache/http/impl/conn/MultiThreadedHttpConnectionManager.java +++ b/src/java/org/apache/http/impl/conn/MultiThreadedHttpConnectionManager.java @@ -54,7 +54,7 @@ import org.apache.http.conn.HostConfiguration; import org.apache.http.conn.HttpConnectionManager; import org.apache.http.conn.HttpHostConnection; import org.apache.http.conn.params.HttpConnectionManagerParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; /** @@ -233,7 +233,7 @@ public class MultiThreadedHttpConnectionManager implements HttpConnectionManager /** * Collection of parameters associated with this connection manager. */ - private HttpParams params = new DefaultHttpParams(); + private HttpParams params = new BasicHttpParams(); /** Connection Pool */ private ConnectionPool connectionPool; diff --git a/src/java/org/apache/http/impl/conn/SimpleHttpConnectionManager.java b/src/java/org/apache/http/impl/conn/SimpleHttpConnectionManager.java index 5f0f53d3e..082679506 100644 --- a/src/java/org/apache/http/impl/conn/SimpleHttpConnectionManager.java +++ b/src/java/org/apache/http/impl/conn/SimpleHttpConnectionManager.java @@ -40,7 +40,7 @@ import org.apache.http.HttpResponse; import org.apache.http.conn.HostConfiguration; import org.apache.http.conn.HttpConnectionManager; import org.apache.http.conn.HttpHostConnection; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; /** @@ -93,7 +93,7 @@ public class SimpleHttpConnectionManager implements HttpConnectionManager { /** * Collection of parameters associated with this connection manager. */ - private HttpParams params = new DefaultHttpParams(); + private HttpParams params = new BasicHttpParams(); /** * The time the connection was made idle. diff --git a/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java b/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java index 3dbf56e24..108c489ee 100644 --- a/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java +++ b/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java @@ -53,7 +53,7 @@ import org.apache.http.conn.HostConfiguration; import org.apache.http.conn.ManagedClientConnection; import org.apache.http.conn.OperatedClientConnection; import org.apache.http.conn.params.HttpConnectionManagerParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; import org.apache.http.protocol.HttpContext; @@ -107,7 +107,7 @@ public class ThreadSafeClientConnManager /** The parameters of this connection manager. */ - private HttpParams params = new DefaultHttpParams(); + private HttpParams params = new BasicHttpParams(); /** The pool of connections being managed. */ diff --git a/src/test/org/apache/http/conn/ssl/TestSSLSocketFactory.java b/src/test/org/apache/http/conn/ssl/TestSSLSocketFactory.java index 65224b450..8c6c0c4e2 100644 --- a/src/test/org/apache/http/conn/ssl/TestSSLSocketFactory.java +++ b/src/test/org/apache/http/conn/ssl/TestSSLSocketFactory.java @@ -34,7 +34,7 @@ package org.apache.http.conn.ssl; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; import javax.net.ServerSocketFactory; @@ -93,7 +93,7 @@ public class TestSSLSocketFactory extends TestCase public void testToString() {} public void testCreateSocket() throws Exception { - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); String password = "changeit"; char[] pwd = password.toCharArray(); diff --git a/src/test/org/apache/http/cookie/TestCookiePolicy.java b/src/test/org/apache/http/cookie/TestCookiePolicy.java index 02a342700..a4d3c4e66 100644 --- a/src/test/org/apache/http/cookie/TestCookiePolicy.java +++ b/src/test/org/apache/http/cookie/TestCookiePolicy.java @@ -35,7 +35,7 @@ import org.apache.http.impl.cookie.BrowserCompatSpecFactory; import org.apache.http.impl.cookie.NetscapeDraftSpecFactory; import org.apache.http.impl.cookie.RFC2109SpecFactory; import org.apache.http.cookie.params.CookieSpecParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; import junit.framework.Test; @@ -106,7 +106,7 @@ public class TestCookiePolicy extends TestCase { } catch (IllegalStateException ex) { // expected } - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); assertNotNull(CookiePolicy.getCookieSpec(CookieSpecParams.NETSCAPE, params)); assertNotNull(CookiePolicy.getCookieSpec(CookieSpecParams.RFC_2109, params)); assertNotNull(CookiePolicy.getCookieSpec(CookieSpecParams.BROWSER_COMPATIBILITY, params)); diff --git a/src/test/org/apache/http/impl/client/TestDefaultResponseConsumedWatcher.java b/src/test/org/apache/http/impl/client/TestDefaultResponseConsumedWatcher.java index 4c069683f..22275aff2 100644 --- a/src/test/org/apache/http/impl/client/TestDefaultResponseConsumedWatcher.java +++ b/src/test/org/apache/http/impl/client/TestDefaultResponseConsumedWatcher.java @@ -37,7 +37,7 @@ import org.apache.http.HttpConnection; import org.apache.http.HttpResponse; import org.apache.http.HttpVersion; import org.apache.http.entity.BasicHttpEntity; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.message.BasicHttpResponse; import org.apache.http.mockup.HttpConnectionMockup; import org.apache.http.protocol.HttpContext; @@ -92,7 +92,7 @@ public class TestDefaultResponseConsumedWatcher extends TestCase { HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_0, 200, "OK"); response.addHeader("Connection", "Close"); - response.setParams(new DefaultHttpParams(null)); + response.setParams(new BasicHttpParams(null)); response.setEntity(entity); // Wrap the entity input stream @@ -115,7 +115,7 @@ public class TestDefaultResponseConsumedWatcher extends TestCase { HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK"); response.addHeader("Connection", "Keep-alive"); - response.setParams(new DefaultHttpParams(null)); + response.setParams(new BasicHttpParams(null)); response.setEntity(entity); // Wrap the entity input stream