HTTPCORE-40
git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@505895 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6314be6638
commit
9ce698c4d5
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue