hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1414680 [1/3] - in /httpcomponents/httpclient/trunk/httpclient/src: examples/org/apache/http/examples/client/ main/java/org/apache/http/auth/params/ main/java/org/apache/http/client/config/ main/java/org/apache/http/client/methods/ main/ja...
Date Wed, 28 Nov 2012 13:45:18 GMT
Author: olegk
Date: Wed Nov 28 13:45:06 2012
New Revision: 1414680

URL: http://svn.apache.org/viewvc?rev=1414680&view=rev
Log:
Deprecated HttpParams and related classes in favor of new configuration API

Added:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/AuthSchemes.java
      - copied, changed from r1414679, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AuthPolicy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/CookieSpecs.java
      - copied, changed from r1414679, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java   (with props)
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/Configurable.java
      - copied, changed from r1414679, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpParamConfig.java   (with props)
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestExpectContinue.java
      - copied, changed from r1414679, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/protocol/TestRequestExpectContinue.java   (with props)
Modified:
    httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java
    httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveBasicAuthentication.java
    httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveDigestAuthentication.java
    httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientProxyAuthentication.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthPNames.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParams.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpRequestBase.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpUriRequest.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AllClientPNames.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AuthPolicy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientPNames.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParams.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ClientContext.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/HttpClientContext.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/HttpClientConnectionManager.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParams.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/BasicSchemeFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/DigestSchemeFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/GGSSchemeBase.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/ProxyAuthenticationStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/TargetAuthenticationStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/builder/BackoffStrategyExec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/builder/ClientExecChain.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/builder/HttpClientBuilder.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/builder/HttpRequestWrapper.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/builder/InternalHttpClient.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/builder/MainClientExec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/builder/ProtocolExec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/builder/RedirectExec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/builder/RetryExec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/builder/ServiceUnavailableRetryExec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/BasicHttpClientConnectionManager.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultRoutePlanner.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/HttpClientConnectionManagerBase.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/methods/TestHttpRequestBase.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/methods/TestRequestBuilder.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/protocol/TestRequestAddCookies.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/protocol/TestRequestDefaultHeaders.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/auth/TestBasicScheme.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestAuthenticationStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestDefaultRedirectStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestAbortHandling.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestClientAuthentication.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestClientReauthentication.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestClientRequestExecution.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestConnectionManagement.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestCookie2Support.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestRedirects.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestSPNegoScheme.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestStatefulConnManagement.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultRoutePlanner.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestSystemDefaultRoutePlanner.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java Wed Nov 28 13:45:06 2012
@@ -31,9 +31,9 @@ import org.apache.http.Header;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpHost;
 import org.apache.http.client.HttpClient;
+import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
-import org.apache.http.conn.params.ConnRoutePNames;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.util.EntityUtils;
@@ -46,13 +46,14 @@ import org.apache.http.util.EntityUtils;
 public class ClientExecuteProxy {
 
     public static void main(String[] args)throws Exception {
-        HttpHost proxy = new HttpHost("127.0.0.1", 8080, "http");
         CloseableHttpClient httpclient = HttpClients.createDefault();
         try {
-            httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
-
             HttpHost target = new HttpHost("issues.apache.org", 443, "https");
+            HttpHost proxy = new HttpHost("127.0.0.1", 8080, "http");
+
+            RequestConfig config = RequestConfig.custom().setDefaultProxy(proxy).build();
             HttpGet request = new HttpGet("/");
+            request.setConfig(config);
 
             System.out.println("executing request to " + target + " via " + proxy);
             CloseableHttpResponse response = httpclient.execute(target, request);

Modified: httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveBasicAuthentication.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveBasicAuthentication.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveBasicAuthentication.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveBasicAuthentication.java Wed Nov 28 13:45:06 2012
@@ -33,14 +33,12 @@ import org.apache.http.client.AuthCache;
 import org.apache.http.client.CredentialsProvider;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.protocol.ClientContext;
 import org.apache.http.client.protocol.HttpClientContext;
 import org.apache.http.impl.auth.BasicScheme;
 import org.apache.http.impl.client.BasicAuthCache;
 import org.apache.http.impl.client.BasicCredentialsProvider;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
-import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.util.EntityUtils;
 
 /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveDigestAuthentication.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveDigestAuthentication.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveDigestAuthentication.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveDigestAuthentication.java Wed Nov 28 13:45:06 2012
@@ -33,14 +33,12 @@ import org.apache.http.client.AuthCache;
 import org.apache.http.client.CredentialsProvider;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.protocol.ClientContext;
 import org.apache.http.client.protocol.HttpClientContext;
 import org.apache.http.impl.auth.DigestScheme;
 import org.apache.http.impl.client.BasicAuthCache;
 import org.apache.http.impl.client.BasicCredentialsProvider;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
-import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.util.EntityUtils;
 
 /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientProxyAuthentication.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientProxyAuthentication.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientProxyAuthentication.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientProxyAuthentication.java Wed Nov 28 13:45:06 2012
@@ -30,9 +30,9 @@ import org.apache.http.HttpHost;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.UsernamePasswordCredentials;
 import org.apache.http.client.CredentialsProvider;
+import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
-import org.apache.http.conn.params.ConnRoutePNames;
 import org.apache.http.impl.client.BasicCredentialsProvider;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
@@ -55,9 +55,9 @@ public class ClientProxyAuthentication {
             HttpHost targetHost = new HttpHost("www.verisign.com", 443, "https");
             HttpHost proxy = new HttpHost("localhost", 8080);
 
-            httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
-
+            RequestConfig config = RequestConfig.custom().setDefaultProxy(proxy).build();
             HttpGet httpget = new HttpGet("/");
+            httpget.setConfig(config);
 
             System.out.println("executing request: " + httpget.getRequestLine());
             System.out.println("via proxy: " + proxy);

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthPNames.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthPNames.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthPNames.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthPNames.java Wed Nov 28 13:45:06 2012
@@ -28,12 +28,18 @@
 package org.apache.http.auth.params;
 
 import org.apache.http.auth.AuthScheme;
+import org.apache.http.auth.AuthSchemeProvider;
+import org.apache.http.client.config.RequestConfig;
 
 /**
  * Parameter names for HTTP authentication classes.
  *
  * @since 4.0
- */
+ *
+ * @deprecated (4.3) use {@link RequestConfig} and constructor parameters of
+ *   {@link AuthSchemeProvider}s.
+*/
+@Deprecated
 public interface AuthPNames {
 
     /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParamBean.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParamBean.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParamBean.java Wed Nov 28 13:45:06 2012
@@ -27,6 +27,8 @@
 
 package org.apache.http.auth.params;
 
+import org.apache.http.auth.AuthSchemeProvider;
+import org.apache.http.client.config.RequestConfig;
 import org.apache.http.params.HttpAbstractParamBean;
 import org.apache.http.params.HttpParams;
 
@@ -36,7 +38,11 @@ import org.apache.http.params.HttpParams
  * using Java Beans conventions.
  *
  * @since 4.0
+ *
+ * @deprecated (4.3) use {@link RequestConfig} and constructor parameters of
+ *   {@link AuthSchemeProvider}s.
  */
+@Deprecated
 public class AuthParamBean extends HttpAbstractParamBean {
 
     public AuthParamBean (final HttpParams params) {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParams.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParams.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParams.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParams.java Wed Nov 28 13:45:06 2012
@@ -28,6 +28,8 @@
 package org.apache.http.auth.params;
 
 import org.apache.http.annotation.Immutable;
+import org.apache.http.auth.AuthSchemeProvider;
+import org.apache.http.client.config.RequestConfig;
 
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.HTTP;
@@ -38,9 +40,11 @@ import org.apache.http.protocol.HTTP;
  *
  * @since 4.0
  *
- * @see AuthPNames
+ * @deprecated (4.3) use {@link RequestConfig} and constructor parameters of
+ *   {@link AuthSchemeProvider}s.
  */
 @Immutable
+@Deprecated
 public final class AuthParams {
 
     private AuthParams() {

Copied: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/AuthSchemes.java (from r1414679, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AuthPolicy.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/AuthSchemes.java?p2=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/AuthSchemes.java&p1=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AuthPolicy.java&r1=1414679&r2=1414680&rev=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AuthPolicy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/AuthSchemes.java Wed Nov 28 13:45:06 2012
@@ -25,28 +25,23 @@
  *
  */
 
-package org.apache.http.client.params;
+package org.apache.http.client.config;
 
 import org.apache.http.annotation.Immutable;
 
 /**
  * Standard authentication schemes supported by HttpClient.
  *
- * @since 4.0
+ * @since 4.3
  */
 @Immutable
-public final class AuthPolicy {
-
-    private AuthPolicy() {
-        super();
-    }
+public final class AuthSchemes {
 
     /**
-     * The NTLM scheme is a proprietary Microsoft Windows Authentication
-     * protocol (considered to be the most secure among currently supported
-     * authentication schemes).
+     * Basic authentication scheme as defined in RFC2617 (considered inherently
+     * insecure, but most widely supported)
      */
-    public static final String NTLM = "NTLM";
+    public static final String BASIC = "Basic";
 
     /**
      * Digest authentication scheme as defined in RFC2617.
@@ -54,23 +49,23 @@ public final class AuthPolicy {
     public static final String DIGEST = "Digest";
 
     /**
-     * Basic authentication scheme as defined in RFC2617 (considered inherently
-     * insecure, but most widely supported)
+     * The NTLM scheme is a proprietary Microsoft Windows Authentication
+     * protocol (considered to be the most secure among currently supported
+     * authentication schemes).
      */
-    public static final String BASIC = "Basic";
+    public static final String NTLM = "NTLM";
 
     /**
      * SPNEGO Authentication scheme.
-     *
-     * @since 4.1
      */
     public static final String SPNEGO = "negotiate";
 
     /**
      * Kerberos Authentication scheme.
-     *
-     * @since 4.2
      */
     public static final String KERBEROS = "Kerberos";
 
+    private AuthSchemes() {
+    }
+
 }

Copied: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/CookieSpecs.java (from r1414679, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/CookieSpecs.java?p2=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/CookieSpecs.java&p1=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java&r1=1414679&r2=1414680&rev=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/CookieSpecs.java Wed Nov 28 13:45:06 2012
@@ -25,20 +25,20 @@
  *
  */
 
-package org.apache.http.client.params;
+package org.apache.http.client.config;
 
 import org.apache.http.annotation.Immutable;
 
 /**
  * Standard cookie specifications supported by HttpClient.
  *
- * @since 4.0
+ * @since 4.3
  */
 @Immutable
-public final class CookiePolicy {
+public final class CookieSpecs {
 
     /**
-     * The policy that provides high degree of compatibilty
+     * The policy that provides high degree of compatibility
      * with common cookie management of popular HTTP agents.
      */
     public static final String BROWSER_COMPATIBILITY = "compatibility";
@@ -65,13 +65,10 @@ public final class CookiePolicy {
 
     /**
      * The policy that ignores cookies.
-     *
-     * @since 4.1-beta1
      */
     public static final String IGNORE_COOKIES = "ignoreCookies";
 
-    private CookiePolicy() {
-        super();
+    private CookieSpecs() {
     }
 
 }

Added: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java?rev=1414680&view=auto
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java (added)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java Wed Nov 28 13:45:06 2012
@@ -0,0 +1,306 @@
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.http.client.config;
+
+import java.net.InetAddress;
+import java.util.Collection;
+
+import org.apache.http.HttpHost;
+
+public class RequestConfig implements Cloneable {
+
+    public static final RequestConfig DEFAULT = new Builder().build();
+
+    private final boolean expectContinueEnabled;
+    private final HttpHost defaultProxy;
+    private final InetAddress localAddress;
+    private final boolean staleConnectionCheckEnabled;
+    private final String cookieSpec;
+    private final boolean redirectsEnabled;
+    private final boolean relativeRedirectsAllowed;
+    private final boolean circularRedirectsAllowed;
+    private final int maxRedirects;
+    private final boolean authenticationEnabled;
+    private final Collection<String> targetPreferredAuthSchemes;
+    private final Collection<String> proxyPreferredAuthSchemes;
+    private final int connectionRequestTimeout;
+    private final int connectTimeout;
+    private final int socketTimeout;
+
+    RequestConfig(
+            final boolean expectContinueEnabled,
+            final HttpHost defaultProxy,
+            final InetAddress localAddress,
+            final boolean staleConnectionCheckEnabled,
+            final String cookieSpec,
+            final boolean redirectsEnabled,
+            final boolean relativeRedirectsAllowed,
+            final boolean circularRedirectsAllowed,
+            final int maxRedirects,
+            final boolean authenticationEnabled,
+            final Collection<String> targetPreferredAuthSchemes,
+            final Collection<String> proxyPreferredAuthSchemes,
+            final int connectionRequestTimeout,
+            final int connectTimeout,
+            final int socketTimeout) {
+        super();
+        this.expectContinueEnabled = expectContinueEnabled;
+        this.defaultProxy = defaultProxy;
+        this.localAddress = localAddress;
+        this.staleConnectionCheckEnabled = staleConnectionCheckEnabled;
+        this.cookieSpec = cookieSpec;
+        this.redirectsEnabled = redirectsEnabled;
+        this.relativeRedirectsAllowed = relativeRedirectsAllowed;
+        this.circularRedirectsAllowed = circularRedirectsAllowed;
+        this.maxRedirects = maxRedirects;
+        this.authenticationEnabled = authenticationEnabled;
+        this.targetPreferredAuthSchemes = targetPreferredAuthSchemes;
+        this.proxyPreferredAuthSchemes = proxyPreferredAuthSchemes;
+        this.connectionRequestTimeout = connectionRequestTimeout;
+        this.connectTimeout = connectTimeout;
+        this.socketTimeout = socketTimeout;
+    }
+
+    public boolean isExpectContinueEnabled() {
+        return expectContinueEnabled;
+    }
+
+    public HttpHost getDefaultProxy() {
+        return defaultProxy;
+    }
+
+    public InetAddress getLocalAddress() {
+        return localAddress;
+    }
+
+    public boolean isStaleConnectionCheckEnabled() {
+        return staleConnectionCheckEnabled;
+    }
+
+    public String getCookieSpec() {
+        return cookieSpec;
+    }
+
+    public boolean isRedirectsEnabled() {
+        return redirectsEnabled;
+    }
+
+    public boolean isRelativeRedirectsAllowed() {
+        return relativeRedirectsAllowed;
+    }
+
+    public boolean isCircularRedirectsAllowed() {
+        return circularRedirectsAllowed;
+    }
+
+    public int getMaxRedirects() {
+        return maxRedirects;
+    }
+
+    public boolean isAuthenticationEnabled() {
+        return authenticationEnabled;
+    }
+
+    public Collection<String> getTargetPreferredAuthSchemes() {
+        return targetPreferredAuthSchemes;
+    }
+
+    public Collection<String> getProxyPreferredAuthSchemes() {
+        return proxyPreferredAuthSchemes;
+    }
+
+    public int getConnectionRequestTimeout() {
+        return connectionRequestTimeout;
+    }
+
+    public int getConnectTimeout() {
+        return connectTimeout;
+    }
+
+    public int getSocketTimeout() {
+        return socketTimeout;
+    }
+
+    @Override
+    protected RequestConfig clone() throws CloneNotSupportedException {
+        return (RequestConfig) super.clone();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append(", expectContinueEnabled=").append(expectContinueEnabled);
+        builder.append(", defaultProxy=").append(defaultProxy);
+        builder.append(", localAddress=").append(localAddress);
+        builder.append(", staleConnectionCheckEnabled=").append(staleConnectionCheckEnabled);
+        builder.append(", cookieSpec=").append(cookieSpec);
+        builder.append(", redirectsEnabled=").append(redirectsEnabled);
+        builder.append(", relativeRedirectsAllowed=").append(relativeRedirectsAllowed);
+        builder.append(", maxRedirects=").append(maxRedirects);
+        builder.append(", circularRedirectsAllowed=").append(circularRedirectsAllowed);
+        builder.append(", authenticationEnabled=").append(authenticationEnabled);
+        builder.append(", targetPreferredAuthSchemes=").append(targetPreferredAuthSchemes);
+        builder.append(", proxyPreferredAuthSchemes=").append(proxyPreferredAuthSchemes);
+        builder.append(", connectionRequestTimeout=").append(connectionRequestTimeout);
+        builder.append(", connectTimeout=").append(connectTimeout);
+        builder.append(", socketTimeout=").append(socketTimeout);
+        builder.append("]");
+        return builder.toString();
+    }
+
+    public static RequestConfig.Builder custom() {
+        return new Builder();
+    }
+
+    public static class Builder {
+
+        private boolean expectContinueEnabled;
+        private HttpHost defaultProxy;
+        private InetAddress localAddress;
+        private boolean staleConnectionCheckEnabled;
+        private String cookieSpec;
+        private boolean redirectsEnabled;
+        private boolean relativeRedirectsAllowed;
+        private boolean circularRedirectsAllowed;
+        private int maxRedirects;
+        private boolean authenticationEnabled;
+        private Collection<String> targetPreferredAuthSchemes;
+        private Collection<String> proxyPreferredAuthSchemes;
+        private int connectionRequestTimeout;
+        private int connectTimeout;
+        private int socketTimeout;
+
+        Builder() {
+            super();
+            this.staleConnectionCheckEnabled = true;
+            this.redirectsEnabled = true;
+            this.maxRedirects = 50;
+            this.relativeRedirectsAllowed = true;
+            this.authenticationEnabled = true;
+            this.connectionRequestTimeout = -1;
+            this.connectTimeout = -1;
+            this.socketTimeout = -1;
+        }
+
+        public Builder setExpectContinueEnabled(boolean expectContinueEnabled) {
+            this.expectContinueEnabled = expectContinueEnabled;
+            return this;
+        }
+
+        public Builder setDefaultProxy(final HttpHost defaultProxy) {
+            this.defaultProxy = defaultProxy;
+            return this;
+        }
+
+        public Builder setLocalAddress(final InetAddress localAddress) {
+            this.localAddress = localAddress;
+            return this;
+        }
+
+        public Builder setStaleConnectionCheckEnabled(boolean staleConnectionCheckEnabled) {
+            this.staleConnectionCheckEnabled = staleConnectionCheckEnabled;
+            return this;
+        }
+
+        public Builder setCookieSpec(final String cookieSpec) {
+            this.cookieSpec = cookieSpec;
+            return this;
+        }
+
+        public Builder setRedirectsEnabled(boolean redirectsEnabled) {
+            this.redirectsEnabled = redirectsEnabled;
+            return this;
+        }
+
+        public Builder setRelativeRedirectsAllowed(boolean relativeRedirectsAllowed) {
+            this.relativeRedirectsAllowed = relativeRedirectsAllowed;
+            return this;
+        }
+
+        public Builder setCircularRedirectsAllowed(boolean circularRedirectsAllowed) {
+            this.circularRedirectsAllowed = circularRedirectsAllowed;
+            return this;
+        }
+
+        public Builder setMaxRedirects(final int maxRedirects) {
+            this.maxRedirects = maxRedirects;
+            return this;
+        }
+
+        public Builder setAuthenticationEnabled(boolean authenticationEnabled) {
+            this.authenticationEnabled = authenticationEnabled;
+            return this;
+        }
+
+        public Builder setTargetPreferredAuthSchemes(final Collection<String> targetPreferredAuthSchemes) {
+            this.targetPreferredAuthSchemes = targetPreferredAuthSchemes;
+            return this;
+        }
+
+        public Builder setProxyPreferredAuthSchemes(final Collection<String> proxyPreferredAuthSchemes) {
+            this.proxyPreferredAuthSchemes = proxyPreferredAuthSchemes;
+            return this;
+        }
+
+        public Builder setConnectionRequestTimeout(final int connectionRequestTimeout) {
+            this.connectionRequestTimeout = connectionRequestTimeout;
+            return this;
+        }
+
+        public Builder setConnectTimeout(int connectTimeout) {
+            this.connectTimeout = connectTimeout;
+            return this;
+        }
+
+        public Builder setSocketTimeout(final int socketTimeout) {
+            this.socketTimeout = socketTimeout;
+            return this;
+        }
+
+        public RequestConfig build() {
+            return new RequestConfig(
+                    expectContinueEnabled,
+                    defaultProxy,
+                    localAddress,
+                    staleConnectionCheckEnabled,
+                    cookieSpec,
+                    redirectsEnabled,
+                    relativeRedirectsAllowed,
+                    circularRedirectsAllowed,
+                    maxRedirects,
+                    authenticationEnabled,
+                    targetPreferredAuthSchemes,
+                    proxyPreferredAuthSchemes,
+                    connectionRequestTimeout,
+                    connectTimeout,
+                    socketTimeout);
+        }
+
+    }
+
+}

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/Configurable.java (from r1414679, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParamBean.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/Configurable.java?p2=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/Configurable.java&p1=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParamBean.java&r1=1414679&r2=1414680&rev=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/params/AuthParamBean.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/Configurable.java Wed Nov 28 13:45:06 2012
@@ -25,26 +25,17 @@
  *
  */
 
-package org.apache.http.auth.params;
+package org.apache.http.client.methods;
 
-import org.apache.http.params.HttpAbstractParamBean;
-import org.apache.http.params.HttpParams;
+import org.apache.http.client.config.RequestConfig;
 
 /**
- * This is a Java Bean class that can be used to wrap an instance of
- * {@link HttpParams} and manipulate HTTP authentication parameters
- * using Java Beans conventions.
+ * Configuration interface for HTTP requests.
  *
- * @since 4.0
+ * @since 4.3
  */
-public class AuthParamBean extends HttpAbstractParamBean {
+public interface Configurable {
 
-    public AuthParamBean (final HttpParams params) {
-        super(params);
-    }
-
-    public void setCredentialCharset (final String charset) {
-        AuthParams.setCredentialCharset(params, charset);
-    }
+    RequestConfig getConfig();
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpRequestBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpRequestBase.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpRequestBase.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpRequestBase.java Wed Nov 28 13:45:06 2012
@@ -36,6 +36,7 @@ import org.apache.http.annotation.NotThr
 
 import org.apache.http.ProtocolVersion;
 import org.apache.http.RequestLine;
+import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.utils.CloneUtils;
 import org.apache.http.concurrent.Cancellable;
 import org.apache.http.conn.ClientConnectionRequest;
@@ -45,15 +46,14 @@ import org.apache.http.message.BasicRequ
 import org.apache.http.params.HttpProtocolParams;
 
 /**
- * Basic implementation of an HTTP request that can be modified. Methods of the
- * {@link AbortableHttpRequest} interface implemented by this class are thread safe.
+ * Base implementation of {@link HttpUriRequest}.
  *
  * @since 4.0
  */
 @SuppressWarnings("deprecation")
 @NotThreadSafe
 public abstract class HttpRequestBase extends AbstractHttpMessage
-    implements HttpUriRequest, HttpExecutionAware, AbortableHttpRequest, Cloneable {
+    implements HttpUriRequest, Configurable, HttpExecutionAware, AbortableHttpRequest, Cloneable {
 
     private Lock abortLock;
     private volatile boolean aborted;
@@ -61,6 +61,7 @@ public abstract class HttpRequestBase ex
     private ProtocolVersion version;
     private URI uri;
     private Cancellable cancellable;
+    private RequestConfig config;
 
     public HttpRequestBase() {
         super();
@@ -108,6 +109,14 @@ public abstract class HttpRequestBase ex
         this.uri = uri;
     }
 
+    public RequestConfig getConfig() {
+        return config;
+    }
+
+    public void setConfig(final RequestConfig config) {
+        this.config = config;
+    }
+
     @Deprecated
     public void setConnectionRequest(final ClientConnectionRequest connRequest) {
         if (this.aborted) {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpUriRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpUriRequest.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpUriRequest.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpUriRequest.java Wed Nov 28 13:45:06 2012
@@ -36,8 +36,6 @@ import org.apache.http.HttpRequest;
  * convenience methods to access request properties such as request URI
  * and method type.
  *
- *
- * <!-- empty lines to avoid svn diff problems -->
  * @since 4.0
  */
 public interface HttpUriRequest extends HttpRequest {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/RequestBuilder.java Wed Nov 28 13:45:06 2012
@@ -36,10 +36,10 @@ import org.apache.http.HttpEntityEnclosi
 import org.apache.http.HttpRequest;
 import org.apache.http.ProtocolVersion;
 import org.apache.http.annotation.NotThreadSafe;
+import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.utils.CloneUtils;
 import org.apache.http.message.BasicHeader;
 import org.apache.http.message.HeaderGroup;
-import org.apache.http.params.HttpParams;
 
 /**
  * @since 4.3
@@ -52,7 +52,7 @@ public class RequestBuilder {
     private URI uri;
     private HeaderGroup headergroup;
     private HttpEntity entity;
-    private HttpParams params;
+    private RequestConfig config;
 
     RequestBuilder(final String method) {
         super();
@@ -124,7 +124,11 @@ public class RequestBuilder {
         } else {
             entity = null;
         }
-        params = request.getParams();
+        if (request instanceof Configurable) {
+            this.config = ((Configurable) request).getConfig();
+        } else {
+            this.config = null;
+        }
         return this;
     }
 
@@ -234,12 +238,12 @@ public class RequestBuilder {
         return this;
     }
 
-    public HttpParams getParams() {
-        return params;
+    public RequestConfig getConfig() {
+        return config;
     }
 
-    public RequestBuilder setParams(final HttpParams params) {
-        this.params = params;
+    public RequestBuilder setConfig(final RequestConfig config) {
+        this.config = config;
         return this;
     }
 
@@ -264,9 +268,7 @@ public class RequestBuilder {
         if (this.headergroup != null) {
             result.setHeaders(this.headergroup.getAllHeaders());
         }
-        if (this.params != null) {
-            result.setParams(this.params);
-        }
+        result.setConfig(this.config);
         return result;
     }
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AllClientPNames.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AllClientPNames.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AllClientPNames.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AllClientPNames.java Wed Nov 28 13:45:06 2012
@@ -29,6 +29,7 @@ package org.apache.http.client.params;
 import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.auth.params.AuthPNames;
+import org.apache.http.client.config.RequestConfig;
 import org.apache.http.cookie.params.CookieSpecPNames;
 import org.apache.http.conn.params.ConnManagerPNames;
 import org.apache.http.conn.params.ConnConnectionPNames;
@@ -46,8 +47,10 @@ import org.apache.http.conn.params.ConnR
  * in which the respective constants are actually defined.
  *
  * @since 4.0
+ *
+ * @deprecated (4.3) use {@link RequestConfig}
  */
-@SuppressWarnings("deprecation")
+@Deprecated
 public interface AllClientPNames extends
     CoreConnectionPNames, CoreProtocolPNames,
     ClientPNames, AuthPNames, CookieSpecPNames,

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AuthPolicy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AuthPolicy.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AuthPolicy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AuthPolicy.java Wed Nov 28 13:45:06 2012
@@ -28,12 +28,16 @@
 package org.apache.http.client.params;
 
 import org.apache.http.annotation.Immutable;
+import org.apache.http.client.config.AuthSchemes;
 
 /**
  * Standard authentication schemes supported by HttpClient.
  *
  * @since 4.0
+ *
+ * @deprecated (4.3) use {@link AuthSchemes}
  */
+@Deprecated
 @Immutable
 public final class AuthPolicy {
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientPNames.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientPNames.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientPNames.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientPNames.java Wed Nov 28 13:45:06 2012
@@ -26,17 +26,18 @@
 
 package org.apache.http.client.params;
 
+import org.apache.http.client.config.RequestConfig;
+
 /**
  * Parameter names for HTTP client parameters.
  *
  * @since 4.0
+ *
+ * @deprecated (4.3) use {@link RequestConfig}
  */
+@Deprecated
 public interface ClientPNames {
 
-    /**
-     * @deprecated (4.2)  do not use
-     */
-    @Deprecated
     public static final String CONNECTION_MANAGER_FACTORY_CLASS_NAME = "http.connection-manager.factory-class-name";
 
     /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientParamBean.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientParamBean.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/ClientParamBean.java Wed Nov 28 13:45:06 2012
@@ -30,6 +30,7 @@ package org.apache.http.client.params;
 import java.util.Collection;
 
 import org.apache.http.annotation.NotThreadSafe;
+import org.apache.http.client.config.RequestConfig;
 
 import org.apache.http.Header;
 import org.apache.http.HttpHost;
@@ -42,7 +43,10 @@ import org.apache.http.params.HttpParams
  * Java Beans conventions.
  *
  * @since 4.0
+ *
+ * @deprecated (4.3) use {@link RequestConfig}
  */
+@Deprecated
 @NotThreadSafe
 public class ClientParamBean extends HttpAbstractParamBean {
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/CookiePolicy.java Wed Nov 28 13:45:06 2012
@@ -28,12 +28,16 @@
 package org.apache.http.client.params;
 
 import org.apache.http.annotation.Immutable;
+import org.apache.http.client.config.CookieSpecs;
 
 /**
  * Standard cookie specifications supported by HttpClient.
  *
  * @since 4.0
+ *
+ * @deprecated (4.3) use {@link CookieSpecs}
  */
+@Deprecated
 @Immutable
 public final class CookiePolicy {
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParams.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParams.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParams.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParams.java Wed Nov 28 13:45:06 2012
@@ -27,6 +27,7 @@
 package org.apache.http.client.params;
 
 import org.apache.http.annotation.Immutable;
+import org.apache.http.client.config.RequestConfig;
 
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
@@ -35,7 +36,10 @@ import org.apache.http.params.HttpParams
  * An adaptor for manipulating HTTP client parameters in {@link HttpParams}.
  *
  * @since 4.0
+ *
+ * @deprecated (4.3) use {@link RequestConfig}
  */
+@Deprecated
 @Immutable
 public class HttpClientParams {
 

Added: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpParamConfig.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpParamConfig.java?rev=1414680&view=auto
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpParamConfig.java (added)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpParamConfig.java Wed Nov 28 13:45:06 2012
@@ -0,0 +1,73 @@
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.http.client.params;
+
+import java.util.Collection;
+
+import org.apache.http.auth.params.AuthPNames;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.conn.params.ConnRouteParams;
+import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.HttpParams;
+import org.apache.http.params.HttpProtocolParams;
+
+/**
+ * @deprecated (4.3) provided for compatibility with {@link HttpParams}. Do not use.
+ *
+ * @since 4.3
+ */
+@Deprecated
+public final class HttpParamConfig {
+
+    private HttpParamConfig() {
+    }
+
+    @SuppressWarnings("unchecked")
+    public static RequestConfig getRequestConfig(final HttpParams params) {
+        return RequestConfig.custom()
+                .setAuthenticationEnabled(HttpClientParams.isAuthenticating(params))
+                .setCircularRedirectsAllowed(params.isParameterFalse(ClientPNames.REJECT_RELATIVE_REDIRECT))
+                .setConnectionRequestTimeout((int) HttpClientParams.getConnectionManagerTimeout(params))
+                .setConnectTimeout(HttpConnectionParams.getConnectionTimeout(params))
+                .setCookieSpec(HttpClientParams.getCookiePolicy(params))
+                .setDefaultProxy(ConnRouteParams.getDefaultProxy(params))
+                .setExpectContinueEnabled(HttpProtocolParams.useExpectContinue(params))
+                .setLocalAddress(ConnRouteParams.getLocalAddress(params))
+                .setMaxRedirects(params.getIntParameter(ClientPNames.MAX_REDIRECTS, 50))
+                .setProxyPreferredAuthSchemes((Collection<String>) params.getParameter(
+                        AuthPNames.PROXY_AUTH_PREF))
+                .setTargetPreferredAuthSchemes((Collection<String>) params.getParameter(
+                        AuthPNames.TARGET_AUTH_PREF))
+                .setRedirectsEnabled(HttpClientParams.isRedirecting(params))
+                .setRelativeRedirectsAllowed(params.isParameterTrue(ClientPNames.ALLOW_CIRCULAR_REDIRECTS))
+                .setSocketTimeout(HttpConnectionParams.getSoTimeout(params))
+                .setStaleConnectionCheckEnabled(HttpConnectionParams.isStaleCheckingEnabled(params))
+                .build();
+    }
+
+}

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpParamConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpParamConfig.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpParamConfig.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ClientContext.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ClientContext.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ClientContext.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/ClientContext.java Wed Nov 28 13:45:06 2012
@@ -125,7 +125,17 @@ public interface ClientContext {
     /**
      * Attribute name of a {@link org.apache.http.config.Lookup} object that represents
      * the actual {@link ConnectionSocketFactory} registry.
+     *
+     * @since 4.3
      */
     public static final String SOCKET_FACTORY_REGISTRY = "http.socket-factory-registry";
 
+    /**
+     * Attribute name of a {@link org.apache.http.client.config.RequestConfig} object that
+     * represents the actual request configuration.
+     *
+     * @since 4.3
+     */
+    public static final String REQUEST_CONFIG = "http.request-config";
+
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/HttpClientContext.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/HttpClientContext.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/HttpClientContext.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/HttpClientContext.java Wed Nov 28 13:45:06 2012
@@ -33,6 +33,7 @@ import org.apache.http.auth.AuthState;
 import org.apache.http.client.AuthCache;
 import org.apache.http.client.CookieStore;
 import org.apache.http.client.CredentialsProvider;
+import org.apache.http.client.config.RequestConfig;
 import org.apache.http.config.Lookup;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.conn.routing.RouteInfo;
@@ -158,4 +159,13 @@ public class HttpClientContext extends H
         setAttribute(USER_TOKEN, obj);
     }
 
+    public RequestConfig getRequestConfig() {
+        RequestConfig config = getAttribute(REQUEST_CONFIG, RequestConfig.class);
+        return config != null ? config : RequestConfig.DEFAULT;
+    }
+
+    public void setRequestConfig(final RequestConfig config) {
+        setAttribute(REQUEST_CONFIG, config);
+    }
+
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java Wed Nov 28 13:45:06 2012
@@ -43,8 +43,9 @@ import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestInterceptor;
 import org.apache.http.annotation.Immutable;
 import org.apache.http.client.CookieStore;
+import org.apache.http.client.config.CookieSpecs;
+import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.client.params.HttpClientParams;
 import org.apache.http.config.Lookup;
 import org.apache.http.conn.routing.RouteInfo;
 import org.apache.http.cookie.Cookie;
@@ -58,14 +59,6 @@ import org.apache.http.protocol.HttpCont
  * Request interceptor that matches cookies available in the current
  * {@link CookieStore} to the request being executed and generates
  * corresponding <code>Cookie</code> request headers.
- * <p>
- * The following parameters can be used to customize the behavior of this
- * class:
- * <ul>
- *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
- *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER}</li>
- *  <li>{@link org.apache.http.client.params.ClientPNames#COOKIE_POLICY}</li>
- * </ul>
  *
  * @since 4.0
  */
@@ -122,7 +115,11 @@ public class RequestAddCookies implement
             return;
         }
 
-        String policy = HttpClientParams.getCookiePolicy(request.getParams());
+        RequestConfig config = clientContext.getRequestConfig();
+        String policy = config.getCookieSpec();
+        if (policy == null) {
+            policy = CookieSpecs.BEST_MATCH;
+        }
         if (this.log.isDebugEnabled()) {
             this.log.debug("CookieSpec selected: " + policy);
         }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java Wed Nov 28 13:45:06 2012
@@ -44,11 +44,22 @@ import org.apache.http.protocol.HttpCont
  *
  * @since 4.0
  */
+@SuppressWarnings("deprecation")
 @Immutable
 public class RequestDefaultHeaders implements HttpRequestInterceptor {
 
-    public RequestDefaultHeaders() {
+    private final Collection<? extends Header> defaultHeaders;
+
+    /**
+     * @since 4.3
+     */
+    public RequestDefaultHeaders(final Collection<? extends Header> defaultHeaders) {
         super();
+        this.defaultHeaders = defaultHeaders;
+    }
+
+    public RequestDefaultHeaders() {
+        this(null);
     }
 
     public void process(final HttpRequest request, final HttpContext context)
@@ -64,8 +75,11 @@ public class RequestDefaultHeaders imple
 
         // Add default headers
         @SuppressWarnings("unchecked")
-        Collection<Header> defHeaders = (Collection<Header>) request.getParams().getParameter(
-                ClientPNames.DEFAULT_HEADERS);
+        Collection<? extends Header> defHeaders = (Collection<? extends Header>)
+            request.getParams().getParameter(ClientPNames.DEFAULT_HEADERS);
+        if (defHeaders == null) {
+            defHeaders = this.defaultHeaders;
+        }
 
         if (defHeaders != null) {
             for (Header defHeader : defHeaders) {

Copied: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestExpectContinue.java (from r1414679, httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestExpectContinue.java?p2=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestExpectContinue.java&p1=httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java&r1=1414679&r2=1414680&rev=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestExpectContinue.java Wed Nov 28 13:45:06 2012
@@ -28,48 +28,53 @@
 package org.apache.http.client.protocol;
 
 import java.io.IOException;
-import java.util.Collection;
 
-import org.apache.http.annotation.Immutable;
-
-import org.apache.http.Header;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpEntityEnclosingRequest;
 import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestInterceptor;
-import org.apache.http.client.params.ClientPNames;
+import org.apache.http.HttpVersion;
+import org.apache.http.ProtocolVersion;
+import org.apache.http.annotation.Immutable;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.protocol.HTTP;
 import org.apache.http.protocol.HttpContext;
+import org.apache.http.util.Args;
 
 /**
- * Request interceptor that adds default request headers.
+ * RequestExpectContinue is responsible for enabling the 'expect-continue'
+ * handshake by adding <code>Expect</code> header.
+ * <p/>
+ * This interceptor takes into account {@link RequestConfig#isExpectContinueEnabled()}
+ * setting.
  *
- * @since 4.0
+ * @since 4.3
  */
 @Immutable
-public class RequestDefaultHeaders implements HttpRequestInterceptor {
+public class RequestExpectContinue implements HttpRequestInterceptor {
 
-    public RequestDefaultHeaders() {
+    public RequestExpectContinue() {
         super();
     }
 
     public void process(final HttpRequest request, final HttpContext context)
             throws HttpException, IOException {
-        if (request == null) {
-            throw new IllegalArgumentException("HTTP request may not be null");
-        }
-
-        String method = request.getRequestLine().getMethod();
-        if (method.equalsIgnoreCase("CONNECT")) {
-            return;
-        }
+        Args.notNull(request, "HTTP request");
 
-        // Add default headers
-        @SuppressWarnings("unchecked")
-        Collection<Header> defHeaders = (Collection<Header>) request.getParams().getParameter(
-                ClientPNames.DEFAULT_HEADERS);
-
-        if (defHeaders != null) {
-            for (Header defHeader : defHeaders) {
-                request.addHeader(defHeader);
+        if (!request.containsHeader(HTTP.EXPECT_DIRECTIVE)) {
+            if (request instanceof HttpEntityEnclosingRequest) {
+                ProtocolVersion ver = request.getRequestLine().getProtocolVersion();
+                HttpEntity entity = ((HttpEntityEnclosingRequest)request).getEntity();
+                // Do not send the expect header if request body is known to be empty
+                if (entity != null
+                        && entity.getContentLength() != 0 && !ver.lessEquals(HttpVersion.HTTP_1_0)) {
+                    HttpClientContext clientContext = HttpClientContext.adapt(context);
+                    RequestConfig config = clientContext.getRequestConfig();
+                    if (config.isExpectContinueEnabled()) {
+                        request.addHeader(HTTP.EXPECT_DIRECTIVE, HTTP.EXPECT_CONTINUE);
+                    }
+                }
             }
         }
     }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/HttpClientConnectionManager.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/HttpClientConnectionManager.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/HttpClientConnectionManager.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/HttpClientConnectionManager.java Wed Nov 28 13:45:06 2012
@@ -79,7 +79,9 @@ public interface HttpClientConnectionMan
             HttpClientConnection conn, Object newState, long validDuration, TimeUnit timeUnit);
 
     void connect(
-            HttpClientConnection conn, HttpHost host, InetAddress localAddress,
+            HttpClientConnection conn,
+            HttpHost host, InetAddress localAddress,
+            int connectTimeout,
             HttpContext context) throws IOException;
 
     void upgrade(

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java Wed Nov 28 13:45:06 2012
@@ -32,6 +32,8 @@ import org.apache.http.impl.conn.Default
  * Parameter names for HTTP client connections.
  *
  * @since 4.0
+ * 
+ * @deprecated (4.1) use custom {@link DefaultHttpResponseParser} implementation.
  */
 @Deprecated
 public interface ConnConnectionPNames {
@@ -53,7 +55,7 @@ public interface ConnConnectionPNames {
      * Use {@link java.lang.Integer#MAX_VALUE} for unlimited number.
      * </p>
      *
-     * @deprecated Use custom {@link DefaultHttpResponseParser} implementation
+     * @deprecated (4.1) Use custom {@link DefaultHttpResponseParser} implementation
      */
     @Deprecated
 	public static final String MAX_STATUS_LINE_GARBAGE = "http.connection.max-status-line-garbage";

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java Wed Nov 28 13:45:06 2012
@@ -31,7 +31,7 @@ package org.apache.http.conn.params;
  *
  * @since 4.0
  * 
- * @deprecated (4.1.2) use configuration methods of the specific connection manager implementation.
+ * @deprecated (4.1) use configuration methods of the specific connection manager implementation.
 */
 @Deprecated 
 public interface ConnManagerPNames {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java Wed Nov 28 13:45:06 2012
@@ -39,7 +39,7 @@ import org.apache.http.params.HttpParams
  *
  * @since 4.0
  * 
- * @deprecated (4.1.2) use configuration methods of the specific connection manager implementation.
+ * @deprecated (4.1) use configuration methods of the specific connection manager implementation.
  */
 @NotThreadSafe
 @Deprecated 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java Wed Nov 28 13:45:06 2012
@@ -40,7 +40,7 @@ import org.apache.http.params.HttpParams
  *
  * @see ConnManagerPNames
  * 
- * @deprecated (4.1.2) use configuration methods of the specific connection manager implementation.
+ * @deprecated (4.1) use configuration methods of the specific connection manager implementation.
  */
 @Deprecated 
 @Immutable

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java Wed Nov 28 13:45:06 2012
@@ -26,11 +26,16 @@
 
 package org.apache.http.conn.params;
 
+import org.apache.http.client.config.RequestConfig;
+
 /**
  * Parameter names for connection routing.
  *
  * @since 4.0
+ *
+ * @deprecated (4.3) use {@link RequestConfig}.
  */
+@Deprecated
 public interface ConnRoutePNames {
 
     /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParamBean.java Wed Nov 28 13:45:06 2012
@@ -32,6 +32,7 @@ import java.net.InetAddress;
 import org.apache.http.annotation.NotThreadSafe;
 
 import org.apache.http.HttpHost;
+import org.apache.http.client.config.RequestConfig;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.params.HttpAbstractParamBean;
 import org.apache.http.params.HttpParams;
@@ -42,7 +43,10 @@ import org.apache.http.params.HttpParams
  * using Java Beans conventions.
  *
  * @since 4.0
+ *
+ * @deprecated (4.3) use {@link RequestConfig}.
  */
+@Deprecated
 @NotThreadSafe
 public class ConnRouteParamBean extends HttpAbstractParamBean {
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParams.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParams.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParams.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParams.java Wed Nov 28 13:45:06 2012
@@ -32,6 +32,7 @@ import org.apache.http.annotation.Immuta
 
 import org.apache.http.HttpHost;
 import org.apache.http.params.HttpParams;
+import org.apache.http.client.config.RequestConfig;
 import org.apache.http.conn.routing.HttpRoute;
 
 /**
@@ -39,7 +40,10 @@ import org.apache.http.conn.routing.Http
  * in {@link HttpParams}.
  *
  * @since 4.0
+ *
+ * @deprecated (4.3) use {@link RequestConfig}.
  */
+@Deprecated
 @Immutable
 public class ConnRouteParams implements ConnRoutePNames {
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecPNames.java Wed Nov 28 13:45:06 2012
@@ -27,11 +27,16 @@
 
 package org.apache.http.cookie.params;
 
+import org.apache.http.cookie.CookieSpecProvider;
+
 /**
  * Parameter names for HTTP cookie management classes.
  *
  * @since 4.0
+ * 
+ * @deprecated (4.3) use constructor parameters of {@link CookieSpecProvider}s.
  */
+@Deprecated
 public interface CookieSpecPNames {
 
     /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecParamBean.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecParamBean.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/params/CookieSpecParamBean.java Wed Nov 28 13:45:06 2012
@@ -30,6 +30,7 @@ package org.apache.http.cookie.params;
 import java.util.Collection;
 
 import org.apache.http.annotation.NotThreadSafe;
+import org.apache.http.cookie.CookieSpecProvider;
 
 import org.apache.http.params.HttpAbstractParamBean;
 import org.apache.http.params.HttpParams;
@@ -40,7 +41,10 @@ import org.apache.http.params.HttpParams
  * conventions.
  *
  * @since 4.0
+ * 
+ * @deprecated (4.3) use constructor parameters of {@link CookieSpecProvider}s.
  */
+@Deprecated
 @NotThreadSafe
 public class CookieSpecParamBean extends HttpAbstractParamBean {
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java Wed Nov 28 13:45:06 2012
@@ -63,6 +63,8 @@ public abstract class AuthSchemeBase imp
      * state.
      *
      * @since 4.2
+     *
+     * @deprecated (4.3) do not use.
      */
     public AuthSchemeBase(final ChallengeState challengeState) {
         super();
@@ -70,7 +72,7 @@ public abstract class AuthSchemeBase imp
     }
 
     public AuthSchemeBase() {
-        this(null);
+        super();
     }
 
     /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/BasicScheme.java Wed Nov 28 13:45:06 2012
@@ -26,9 +26,12 @@
 
 package org.apache.http.impl.auth;
 
+import java.nio.charset.Charset;
+
 import org.apache.http.annotation.NotThreadSafe;
 
 import org.apache.commons.codec.binary.Base64;
+import org.apache.http.Consts;
 import org.apache.http.Header;
 import org.apache.http.HttpRequest;
 import org.apache.http.auth.AuthenticationException;
@@ -38,7 +41,6 @@ import org.apache.http.auth.Credentials;
 import org.apache.http.auth.AUTH;
 import org.apache.http.auth.InvalidCredentialsException;
 import org.apache.http.auth.MalformedChallengeException;
-import org.apache.http.auth.params.AuthParams;
 import org.apache.http.message.BufferedHeader;
 import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.protocol.HttpContext;
@@ -47,12 +49,6 @@ import org.apache.http.util.EncodingUtil
 
 /**
  * Basic authentication scheme as defined in RFC 2617.
- * <p>
- * The following parameters can be used to customize the behavior of this
- * class:
- * <ul>
- *  <li>{@link org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET}</li>
- * </ul>
  *
  * @since 4.0
  */
@@ -63,18 +59,28 @@ public class BasicScheme extends RFC2617
     private boolean complete;
 
     /**
+     * @since 4.3
+     */
+    public BasicScheme(final Charset credentialsCharset) {
+        super(credentialsCharset);
+        this.complete = false;
+    }
+
+    /**
      * Creates an instance of <tt>BasicScheme</tt> with the given challenge
      * state.
      *
      * @since 4.2
+     *
+     * @deprecated (4.3) do not use.
      */
+    @Deprecated
     public BasicScheme(final ChallengeState challengeState) {
         super(challengeState);
-        this.complete = false;
     }
 
     public BasicScheme() {
-        this(null);
+        this(Consts.ASCII);
     }
 
     /**
@@ -153,9 +159,24 @@ public class BasicScheme extends RFC2617
         if (request == null) {
             throw new IllegalArgumentException("HTTP request may not be null");
         }
+        StringBuilder tmp = new StringBuilder();
+        tmp.append(credentials.getUserPrincipal().getName());
+        tmp.append(":");
+        tmp.append((credentials.getPassword() == null) ? "null" : credentials.getPassword());
+
+        byte[] base64password = Base64.encodeBase64(
+                EncodingUtils.getBytes(tmp.toString(), getCredentialsCharset(request)));
+
+        CharArrayBuffer buffer = new CharArrayBuffer(32);
+        if (isProxy()) {
+            buffer.append(AUTH.PROXY_AUTH_RESP);
+        } else {
+            buffer.append(AUTH.WWW_AUTH_RESP);
+        }
+        buffer.append(": Basic ");
+        buffer.append(base64password, 0, base64password.length);
 
-        String charset = AuthParams.getCredentialCharset(request.getParams());
-        return authenticate(credentials, charset, isProxy());
+        return new BufferedHeader(buffer);
     }
 
     /**
@@ -166,7 +187,10 @@ public class BasicScheme extends RFC2617
      * @param charset The charset to use for encoding the credentials
      *
      * @return a basic authorization header
+     *
+     * @deprecated (4.3) use {@link #authenticate(Credentials, HttpRequest, HttpContext)}.
      */
+    @Deprecated
     public static Header authenticate(
             final Credentials credentials,
             final String charset,

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/BasicSchemeFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/BasicSchemeFactory.java?rev=1414680&r1=1414679&r2=1414680&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/BasicSchemeFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/BasicSchemeFactory.java Wed Nov 28 13:45:06 2012
@@ -27,6 +27,8 @@
 
 package org.apache.http.impl.auth;
 
+import java.nio.charset.Charset;
+
 import org.apache.http.annotation.Immutable;
 
 import org.apache.http.auth.AuthScheme;
@@ -45,12 +47,26 @@ import org.apache.http.protocol.HttpCont
 @SuppressWarnings("deprecation")
 public class BasicSchemeFactory implements AuthSchemeFactory, AuthSchemeProvider {
 
+    private final Charset charset;
+
+    /**
+     * @since 4.3
+     */
+    public BasicSchemeFactory(final Charset charset) {
+        super();
+        this.charset = charset;
+    }
+
+    public BasicSchemeFactory() {
+        this(null);
+    }
+
     public AuthScheme newInstance(final HttpParams params) {
         return new BasicScheme();
     }
 
     public AuthScheme create(final HttpContext context) {
-        return new BasicScheme();
+        return new BasicScheme(this.charset);
     }
 
 }



Mime
View raw message