hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1724315 [7/14] - in /httpcomponents/httpclient/trunk: ./ fluent-hc/src/examples/org/apache/http/client/fluent/ fluent-hc/src/main/java/org/apache/http/client/fluent/ fluent-hc/src/test/java/org/apache/http/client/fluent/ httpclient-cache/s...
Date Tue, 12 Jan 2016 20:43:42 GMT
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=1724315&r1=1724314&r2=1724315&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 Tue Jan 12 20:43:36 2016
@@ -26,7 +26,8 @@
  */
 package org.apache.http.examples.client;
 
-import org.apache.http.HttpHost;
+import org.apache.hc.core5.http.HttpHost;
+import org.apache.hc.core5.http.entity.EntityUtils;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.UsernamePasswordCredentials;
 import org.apache.http.client.config.RequestConfig;
@@ -35,7 +36,6 @@ import org.apache.http.client.methods.Ht
 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.util.EntityUtils;
 
 /**
  * A simple example that uses HttpClient to execute an HTTP request

Modified: httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithRequestFuture.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithRequestFuture.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithRequestFuture.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithRequestFuture.java Tue Jan 12 20:43:36 2016
@@ -32,13 +32,13 @@ import java.util.concurrent.ExecutorServ
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.http.HttpResponse;
-import org.apache.http.client.ClientProtocolException;
+import org.apache.hc.core5.concurrent.FutureCallback;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpStatus;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.ResponseHandler;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.protocol.HttpClientContext;
-import org.apache.http.concurrent.FutureCallback;
 import org.apache.http.impl.client.FutureRequestExecutionService;
 import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.http.impl.client.HttpRequestFutureTask;
@@ -56,7 +56,7 @@ public class ClientWithRequestFuture {
             // Because things are asynchronous, you must provide a ResponseHandler
             ResponseHandler<Boolean> handler = new ResponseHandler<Boolean>() {
                 @Override
-                public Boolean handleResponse(HttpResponse response) throws ClientProtocolException, IOException {
+                public Boolean handleResponse(HttpResponse response) throws IOException {
                     // simply return true if the status was OK
                     return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK;
                 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithResponseHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithResponseHandler.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithResponseHandler.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithResponseHandler.java Tue Jan 12 20:43:36 2016
@@ -29,14 +29,15 @@ package org.apache.http.examples.client;
 
 import java.io.IOException;
 
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.ParseException;
+import org.apache.hc.core5.http.entity.EntityUtils;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.ResponseHandler;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
-import org.apache.http.util.EntityUtils;
 
 /**
  * This example demonstrates the use of the {@link ResponseHandler} to simplify
@@ -55,11 +56,15 @@ public class ClientWithResponseHandler {
 
                 @Override
                 public String handleResponse(
-                        final HttpResponse response) throws ClientProtocolException, IOException {
+                        final HttpResponse response) throws IOException {
                     int status = response.getStatusLine().getStatusCode();
                     if (status >= 200 && status < 300) {
                         HttpEntity entity = response.getEntity();
-                        return entity != null ? EntityUtils.toString(entity) : null;
+                        try {
+                            return entity != null ? EntityUtils.toString(entity) : null;
+                        } catch (ParseException ex) {
+                            throw new ClientProtocolException(ex);
+                        }
                     } else {
                         throw new ClientProtocolException("Unexpected response status: " + status);
                     }

Modified: httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ProxyTunnelDemo.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ProxyTunnelDemo.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ProxyTunnelDemo.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ProxyTunnelDemo.java Tue Jan 12 20:43:36 2016
@@ -32,11 +32,11 @@ import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.io.Writer;
 import java.net.Socket;
+import java.nio.charset.StandardCharsets;
 
-import org.apache.http.HttpHost;
+import org.apache.hc.core5.http.HttpHost;
 import org.apache.http.auth.UsernamePasswordCredentials;
 import org.apache.http.impl.client.ProxyClient;
-import org.apache.http.protocol.HTTP;
 
 /**
  * Example code for using {@link ProxyClient} in order to establish a tunnel through an HTTP proxy.
@@ -50,7 +50,7 @@ public class ProxyTunnelDemo {
         HttpHost proxy = new HttpHost("localhost", 8888);
         UsernamePasswordCredentials credentials = new UsernamePasswordCredentials("user", "pwd".toCharArray());
         try (Socket socket = proxyClient.tunnel(proxy, target, credentials)) {
-            Writer out = new OutputStreamWriter(socket.getOutputStream(), HTTP.DEF_CONTENT_CHARSET);
+            Writer out = new OutputStreamWriter(socket.getOutputStream(), StandardCharsets.ISO_8859_1);
             out.write("GET / HTTP/1.1\r\n");
             out.write("Host: " + target.toHostString() + "\r\n");
             out.write("Agent: whatever\r\n");
@@ -58,7 +58,7 @@ public class ProxyTunnelDemo {
             out.write("\r\n");
             out.flush();
             BufferedReader in = new BufferedReader(
-                    new InputStreamReader(socket.getInputStream(), HTTP.DEF_CONTENT_CHARSET));
+                    new InputStreamReader(socket.getInputStream(), StandardCharsets.ISO_8859_1));
             String line = null;
             while ((line = in.readLine()) != null) {
                 System.out.println(line);

Modified: httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/QuickStart.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/QuickStart.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/QuickStart.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/QuickStart.java Tue Jan 12 20:43:36 2016
@@ -29,16 +29,16 @@ package org.apache.http.examples.client;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.http.HttpEntity;
-import org.apache.http.NameValuePair;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.NameValuePair;
+import org.apache.hc.core5.http.entity.EntityUtils;
+import org.apache.hc.core5.http.message.BasicNameValuePair;
 import org.apache.http.client.entity.UrlEncodedFormEntity;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
-import org.apache.http.message.BasicNameValuePair;
-import org.apache.http.util.EntityUtils;
 
 public class QuickStart {
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthChallenge.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthChallenge.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthChallenge.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthChallenge.java Tue Jan 12 20:43:36 2016
@@ -31,9 +31,9 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.http.NameValuePair;
-import org.apache.http.annotation.Immutable;
-import org.apache.http.util.Args;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.NameValuePair;
+import org.apache.hc.core5.util.Args;
 
 /**
  * This class represents an authentication challenge consisting of a auth scheme

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthExchange.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthExchange.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthExchange.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthExchange.java Tue Jan 12 20:43:36 2016
@@ -28,8 +28,8 @@ package org.apache.http.auth;
 
 import java.util.Queue;
 
-import org.apache.http.annotation.NotThreadSafe;
-import org.apache.http.util.Args;
+import org.apache.hc.core5.annotation.NotThreadSafe;
+import org.apache.hc.core5.util.Args;
 
 /**
  * This class represents the actual state of authentication handshake including the current {@link AuthScheme}

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthScheme.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthScheme.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthScheme.java Tue Jan 12 20:43:36 2016
@@ -28,9 +28,9 @@ package org.apache.http.auth;
 
 import java.security.Principal;
 
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.core5.http.HttpHost;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 /**
  * This interface represents an abstract challenge-response oriented authentication scheme.
@@ -112,7 +112,7 @@ public interface AuthScheme {
      */
     void processChallenge(
             AuthChallenge authChallenge,
-            HttpContext context) throws  MalformedChallengeException;
+            HttpContext context) throws MalformedChallengeException;
 
     /**
      * Authentication process may involve a series of challenge-response exchanges.

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthSchemeProvider.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthSchemeProvider.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthSchemeProvider.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthSchemeProvider.java Tue Jan 12 20:43:36 2016
@@ -27,7 +27,7 @@
 
 package org.apache.http.auth;
 
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 /**
  * Factory for {@link AuthScheme} implementations.

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthScope.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthScope.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthScope.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthScope.java Tue Jan 12 20:43:36 2016
@@ -28,10 +28,10 @@ package org.apache.http.auth;
 
 import java.util.Locale;
 
-import org.apache.http.HttpHost;
-import org.apache.http.annotation.Immutable;
-import org.apache.http.util.Args;
-import org.apache.http.util.LangUtils;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.HttpHost;
+import org.apache.hc.core5.util.Args;
+import org.apache.hc.core5.util.LangUtils;
 
 /**
  * {@code AuthScope} represents an authentication scope consisting of a host name,

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthenticationException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthenticationException.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthenticationException.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthenticationException.java Tue Jan 12 20:43:36 2016
@@ -26,8 +26,8 @@
  */
 package org.apache.http.auth;
 
-import org.apache.http.ProtocolException;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.ProtocolException;
 
 /**
  * Signals a failure in authentication process

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/BasicUserPrincipal.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/BasicUserPrincipal.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/BasicUserPrincipal.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/BasicUserPrincipal.java Tue Jan 12 20:43:36 2016
@@ -29,9 +29,9 @@ package org.apache.http.auth;
 import java.io.Serializable;
 import java.security.Principal;
 
-import org.apache.http.annotation.Immutable;
-import org.apache.http.util.Args;
-import org.apache.http.util.LangUtils;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.util.Args;
+import org.apache.hc.core5.util.LangUtils;
 
 /**
  * Basic user principal used for HTTP authentication

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/InvalidCredentialsException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/InvalidCredentialsException.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/InvalidCredentialsException.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/InvalidCredentialsException.java Tue Jan 12 20:43:36 2016
@@ -26,7 +26,7 @@
  */
 package org.apache.http.auth;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 
 /**
  * Authentication credentials required to respond to a authentication

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/KerberosCredentials.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/KerberosCredentials.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/KerberosCredentials.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/KerberosCredentials.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.auth;
 import java.io.Serializable;
 import java.security.Principal;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 import org.ietf.jgss.GSSCredential;
 
 /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/MalformedChallengeException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/MalformedChallengeException.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/MalformedChallengeException.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/MalformedChallengeException.java Tue Jan 12 20:43:36 2016
@@ -26,8 +26,8 @@
  */
 package org.apache.http.auth;
 
-import org.apache.http.ProtocolException;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.ProtocolException;
 
 /**
  * Signals that authentication challenge is in some way invalid or

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTCredentials.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTCredentials.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTCredentials.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTCredentials.java Tue Jan 12 20:43:36 2016
@@ -30,9 +30,9 @@ import java.io.Serializable;
 import java.security.Principal;
 import java.util.Locale;
 
-import org.apache.http.annotation.Immutable;
-import org.apache.http.util.Args;
-import org.apache.http.util.LangUtils;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.util.Args;
+import org.apache.hc.core5.util.LangUtils;
 
 /**
  * {@link Credentials} implementation for Microsoft Windows platforms that includes

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/NTUserPrincipal.java Tue Jan 12 20:43:36 2016
@@ -30,9 +30,9 @@ import java.io.Serializable;
 import java.security.Principal;
 import java.util.Locale;
 
-import org.apache.http.annotation.Immutable;
-import org.apache.http.util.Args;
-import org.apache.http.util.LangUtils;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.util.Args;
+import org.apache.hc.core5.util.LangUtils;
 
 /**
  * Microsoft Windows specific user principal implementation.

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/UsernamePasswordCredentials.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/UsernamePasswordCredentials.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/UsernamePasswordCredentials.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/UsernamePasswordCredentials.java Tue Jan 12 20:43:36 2016
@@ -29,9 +29,9 @@ package org.apache.http.auth;
 import java.io.Serializable;
 import java.security.Principal;
 
-import org.apache.http.annotation.Immutable;
-import org.apache.http.util.Args;
-import org.apache.http.util.LangUtils;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.util.Args;
+import org.apache.hc.core5.util.LangUtils;
 
 /**
  * Simple {@link Credentials} implementation based on a user name / password

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/util/ByteArrayBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/util/ByteArrayBuilder.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/util/ByteArrayBuilder.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/util/ByteArrayBuilder.java Tue Jan 12 20:43:36 2016
@@ -33,9 +33,9 @@ import java.nio.charset.Charset;
 import java.nio.charset.CharsetEncoder;
 import java.nio.charset.CoderResult;
 import java.nio.charset.CodingErrorAction;
+import java.nio.charset.StandardCharsets;
 
-import org.apache.http.Consts;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 
 /**
  * Builder class for sequences of bytes.
@@ -102,7 +102,7 @@ public class ByteArrayBuilder {
 
     private void doAppend(final CharBuffer charBuffer) {
         if (this.charsetEncoder == null) {
-            this.charsetEncoder = Consts.ASCII.newEncoder()
+            this.charsetEncoder = StandardCharsets.US_ASCII.newEncoder()
                     .onMalformedInput(CodingErrorAction.IGNORE)
                     .onUnmappableCharacter(CodingErrorAction.REPLACE);
         }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/AuthCache.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/AuthCache.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/AuthCache.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/AuthCache.java Tue Jan 12 20:43:36 2016
@@ -26,7 +26,7 @@
  */
 package org.apache.http.client;
 
-import org.apache.http.HttpHost;
+import org.apache.hc.core5.http.HttpHost;
 import org.apache.http.auth.AuthScheme;
 
 /**

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/AuthenticationStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/AuthenticationStrategy.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/AuthenticationStrategy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/AuthenticationStrategy.java Tue Jan 12 20:43:36 2016
@@ -30,10 +30,10 @@ package org.apache.http.client;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.apache.http.auth.AuthChallenge;
 import org.apache.http.auth.AuthScheme;
 import org.apache.http.auth.ChallengeType;
-import org.apache.http.protocol.HttpContext;
 
 /**
  * Strategy to select auth schemes in order of preference based on auth challenges

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/BackoffManager.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/BackoffManager.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/BackoffManager.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/BackoffManager.java Tue Jan 12 20:43:36 2016
@@ -43,12 +43,12 @@ public interface BackoffManager {
      * using a connection should be interpreted as a
      * backoff signal.
      */
-    public void backOff(HttpRoute route);
+    void backOff(HttpRoute route);
 
     /**
      * Called when we have determined that the result of
      * using a connection has succeeded and that we may
      * probe for more connections.
      */
-    public void probe(HttpRoute route);
+    void probe(HttpRoute route);
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/CircularRedirectException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/CircularRedirectException.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/CircularRedirectException.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/CircularRedirectException.java Tue Jan 12 20:43:36 2016
@@ -26,7 +26,7 @@
  */
 package org.apache.http.client;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 
 /**
  * Signals a circular redirect

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ClientProtocolException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ClientProtocolException.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ClientProtocolException.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ClientProtocolException.java Tue Jan 12 20:43:36 2016
@@ -28,7 +28,7 @@ package org.apache.http.client;
 
 import java.io.IOException;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 
 /**
  * Signals an error in the HTTP protocol.

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ConnectionBackoffStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ConnectionBackoffStrategy.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ConnectionBackoffStrategy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ConnectionBackoffStrategy.java Tue Jan 12 20:43:36 2016
@@ -26,7 +26,7 @@
  */
 package org.apache.http.client;
 
-import org.apache.http.HttpResponse;
+import org.apache.hc.core5.http.HttpResponse;
 
 /**
  * When managing a dynamic number of connections for a given route, this

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/HttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/HttpClient.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/HttpClient.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/HttpClient.java Tue Jan 12 20:43:36 2016
@@ -29,11 +29,11 @@ package org.apache.http.client;
 
 import java.io.IOException;
 
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
+import org.apache.hc.core5.http.HttpHost;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.protocol.HttpContext;
 
 /**
  * This interface represents only the most basic contract for HTTP request
@@ -59,7 +59,7 @@ public interface HttpClient {
      * @throws ClientProtocolException in case of an http protocol error
      */
     HttpResponse execute(HttpUriRequest request)
-        throws IOException, ClientProtocolException;
+        throws IOException;
 
     /**
      * Executes HTTP request using the given context.
@@ -77,7 +77,7 @@ public interface HttpClient {
      * @throws ClientProtocolException in case of an http protocol error
      */
     HttpResponse execute(HttpUriRequest request, HttpContext context)
-        throws IOException, ClientProtocolException;
+        throws IOException;
 
     /**
      * Executes HTTP request using the default context.
@@ -97,7 +97,7 @@ public interface HttpClient {
      * @throws ClientProtocolException in case of an http protocol error
      */
     HttpResponse execute(HttpHost target, HttpRequest request)
-        throws IOException, ClientProtocolException;
+        throws IOException;
 
     /**
      * Executes HTTP request using the given context.
@@ -120,7 +120,7 @@ public interface HttpClient {
      */
     HttpResponse execute(HttpHost target, HttpRequest request,
                          HttpContext context)
-        throws IOException, ClientProtocolException;
+        throws IOException;
 
     /**
      * Executes HTTP request using the default context and processes the
@@ -143,7 +143,7 @@ public interface HttpClient {
     <T> T execute(
             HttpUriRequest request,
             ResponseHandler<? extends T> responseHandler)
-        throws IOException, ClientProtocolException;
+        throws IOException;
 
     /**
      * Executes HTTP request using the given context and processes the
@@ -169,7 +169,7 @@ public interface HttpClient {
             HttpUriRequest request,
             ResponseHandler<? extends T> responseHandler,
             HttpContext context)
-        throws IOException, ClientProtocolException;
+        throws IOException;
 
     /**
      * Executes HTTP request to the target using the default context and
@@ -197,7 +197,7 @@ public interface HttpClient {
             HttpHost target,
             HttpRequest request,
             ResponseHandler<? extends T> responseHandler)
-        throws IOException, ClientProtocolException;
+        throws IOException;
 
     /**
      * Executes HTTP request to the target using the given context and
@@ -228,6 +228,6 @@ public interface HttpClient {
             HttpRequest request,
             ResponseHandler<? extends T> responseHandler,
             HttpContext context)
-        throws IOException, ClientProtocolException;
+        throws IOException;
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/HttpRequestRetryHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/HttpRequestRetryHandler.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/HttpRequestRetryHandler.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/HttpRequestRetryHandler.java Tue Jan 12 20:43:36 2016
@@ -29,8 +29,8 @@ package org.apache.http.client;
 
 import java.io.IOException;
 
-import org.apache.http.HttpRequest;
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 /**
  * A handler for determining if an HttpRequest should be retried after a

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/HttpResponseException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/HttpResponseException.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/HttpResponseException.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/HttpResponseException.java Tue Jan 12 20:43:36 2016
@@ -26,7 +26,7 @@
  */
 package org.apache.http.client;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 
 /**
  * Signals a non 2xx HTTP response.

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/NonRepeatableRequestException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/NonRepeatableRequestException.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/NonRepeatableRequestException.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/NonRepeatableRequestException.java Tue Jan 12 20:43:36 2016
@@ -26,8 +26,8 @@
  */
 package org.apache.http.client;
 
-import org.apache.http.ProtocolException;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.ProtocolException;
 
 /**
  * Signals failure to retry the request due to non-repeatable request

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/RedirectException.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/RedirectException.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/RedirectException.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/RedirectException.java Tue Jan 12 20:43:36 2016
@@ -26,8 +26,8 @@
  */
 package org.apache.http.client;
 
-import org.apache.http.ProtocolException;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.ProtocolException;
 
 /**
  * Signals violation of HTTP specification caused by an invalid redirect

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/RedirectStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/RedirectStrategy.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/RedirectStrategy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/RedirectStrategy.java Tue Jan 12 20:43:36 2016
@@ -27,11 +27,11 @@
 
 package org.apache.http.client;
 
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.protocol.HttpContext;
 
 /**
  * A strategy for determining if an HTTP request should be redirected to

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ResponseHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ResponseHandler.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ResponseHandler.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ResponseHandler.java Tue Jan 12 20:43:36 2016
@@ -28,7 +28,7 @@ package org.apache.http.client;
 
 import java.io.IOException;
 
-import org.apache.http.HttpResponse;
+import org.apache.hc.core5.http.HttpResponse;
 
 /**
  * Handler that encapsulates the process of generating a response object
@@ -49,6 +49,6 @@ public interface ResponseHandler<T> {
      * @throws ClientProtocolException in case of an http protocol error
      * @throws IOException in case of a problem or the connection was aborted
      */
-    T handleResponse(HttpResponse response) throws ClientProtocolException, IOException;
+    T handleResponse(HttpResponse response) throws IOException;
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ServiceUnavailableRetryStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ServiceUnavailableRetryStrategy.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ServiceUnavailableRetryStrategy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/ServiceUnavailableRetryStrategy.java Tue Jan 12 20:43:36 2016
@@ -27,8 +27,8 @@
 
 package org.apache.http.client;
 
-import org.apache.http.HttpResponse;
-import org.apache.http.protocol.HttpContext;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 /**
  * Strategy interface that allows API users to plug in their own logic to

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/UserTokenHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/UserTokenHandler.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/UserTokenHandler.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/UserTokenHandler.java Tue Jan 12 20:43:36 2016
@@ -27,8 +27,8 @@
 
 package org.apache.http.client;
 
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.apache.http.conn.routing.HttpRoute;
-import org.apache.http.protocol.HttpContext;
 
 /**
  * A handler for determining if the given execution context is user specific

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/AuthSchemes.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/AuthSchemes.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/AuthSchemes.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/AuthSchemes.java Tue Jan 12 20:43:36 2016
@@ -27,7 +27,7 @@
 
 package org.apache.http.client.config;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 
 /**
  * Standard authentication schemes supported by HttpClient.

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/CookieSpecs.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/CookieSpecs.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/CookieSpecs.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/CookieSpecs.java Tue Jan 12 20:43:36 2016
@@ -27,7 +27,7 @@
 
 package org.apache.http.client.config;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 
 /**
  * Standard cookie specifications supported by HttpClient.

Modified: 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=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java Tue Jan 12 20:43:36 2016
@@ -30,13 +30,11 @@ package org.apache.http.client.config;
 import java.net.InetAddress;
 import java.util.Collection;
 
-import org.apache.http.HttpHost;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.HttpHost;
 
 /**
  *  Immutable class encapsulating request configuration items.
- *  The default setting for stale connection checking changed
- *  to false, and the feature was deprecated starting with version 4.4.
  */
 @Immutable
 public class RequestConfig implements Cloneable {
@@ -441,6 +439,11 @@ public class RequestConfig implements Cl
             return this;
         }
 
+        public Builder setStaleConnectionCheckEnabled(final boolean staleConnectionCheckEnabled) {
+            this.staleConnectionCheckEnabled = staleConnectionCheckEnabled;
+            return this;
+        }
+
         public RequestConfig build() {
             return new RequestConfig(
                     expectContinueEnabled,

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/DecompressingEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/DecompressingEntity.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/DecompressingEntity.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/DecompressingEntity.java Tue Jan 12 20:43:36 2016
@@ -30,10 +30,9 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import org.apache.http.Header;
-import org.apache.http.HttpEntity;
-import org.apache.http.entity.HttpEntityWrapper;
-import org.apache.http.util.Args;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.entity.HttpEntityWrapper;
+import org.apache.hc.core5.util.Args;
 
 /**
  * Common base class for decompressing {@link HttpEntity} implementations.
@@ -68,13 +67,13 @@ public class DecompressingEntity extends
     }
 
     private InputStream getDecompressingStream() throws IOException {
-        final InputStream in = wrappedEntity.getContent();
+        final InputStream in = super.getContent();
         return new LazyDecompressingInputStream(in, inputStreamFactory);
     }
 
     @Override
     public InputStream getContent() throws IOException {
-        if (wrappedEntity.isStreaming()) {
+        if (super.isStreaming()) {
             if (content == null) {
                 content = getDecompressingStream();
             }
@@ -97,7 +96,7 @@ public class DecompressingEntity extends
     }
 
     @Override
-    public Header getContentEncoding() {
+    public String getContentEncoding() {
         /* Content encoding is now 'identity' */
         return null;
     }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/DeflateDecompressingEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/DeflateDecompressingEntity.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/DeflateDecompressingEntity.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/DeflateDecompressingEntity.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.client.entity;
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.http.HttpEntity;
+import org.apache.hc.core5.http.HttpEntity;
 
 /**
  * {@link org.apache.http.entity.HttpEntityWrapper} responsible for handling

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/DeflateInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/DeflateInputStream.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/DeflateInputStream.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/DeflateInputStream.java Tue Jan 12 20:43:36 2016
@@ -39,7 +39,7 @@ import java.util.zip.ZipException;
  */
 public class DeflateInputStream extends InputStream {
 
-    private InputStream sourceStream;
+    private final InputStream sourceStream;
 
     public DeflateInputStream(final InputStream wrapped) throws IOException {
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/EntityBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/EntityBuilder.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/EntityBuilder.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/EntityBuilder.java Tue Jan 12 20:43:36 2016
@@ -33,17 +33,17 @@ import java.io.Serializable;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.http.HttpEntity;
-import org.apache.http.NameValuePair;
-import org.apache.http.annotation.NotThreadSafe;
-import org.apache.http.entity.AbstractHttpEntity;
-import org.apache.http.entity.BasicHttpEntity;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.FileEntity;
-import org.apache.http.entity.InputStreamEntity;
-import org.apache.http.entity.SerializableEntity;
-import org.apache.http.entity.StringEntity;
+import org.apache.hc.core5.annotation.NotThreadSafe;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.NameValuePair;
+import org.apache.hc.core5.http.entity.AbstractHttpEntity;
+import org.apache.hc.core5.http.entity.BasicHttpEntity;
+import org.apache.hc.core5.http.entity.ByteArrayEntity;
+import org.apache.hc.core5.http.entity.ContentType;
+import org.apache.hc.core5.http.entity.FileEntity;
+import org.apache.hc.core5.http.entity.InputStreamEntity;
+import org.apache.hc.core5.http.entity.SerializableEntity;
+import org.apache.hc.core5.http.entity.StringEntity;
 
 /**
  * Builder for {@link HttpEntity} instances.

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/GzipCompressingEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/GzipCompressingEntity.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/GzipCompressingEntity.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/GzipCompressingEntity.java Tue Jan 12 20:43:36 2016
@@ -58,12 +58,9 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.zip.GZIPOutputStream;
 
-import org.apache.http.Header;
-import org.apache.http.HttpEntity;
-import org.apache.http.entity.HttpEntityWrapper;
-import org.apache.http.message.BasicHeader;
-import org.apache.http.protocol.HTTP;
-import org.apache.http.util.Args;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.entity.HttpEntityWrapper;
+import org.apache.hc.core5.util.Args;
 
 /**
  * Wrapping entity that compresses content when {@link #writeTo writing}.
@@ -80,8 +77,8 @@ public class GzipCompressingEntity exten
     }
 
     @Override
-    public Header getContentEncoding() {
-        return new BasicHeader(HTTP.CONTENT_ENCODING, GZIP_CODEC);
+    public String getContentEncoding() {
+        return GZIP_CODEC;
     }
 
     @Override
@@ -104,7 +101,7 @@ public class GzipCompressingEntity exten
     public void writeTo(final OutputStream outstream) throws IOException {
         Args.notNull(outstream, "Output stream");
         final GZIPOutputStream gzip = new GZIPOutputStream(outstream);
-        wrappedEntity.writeTo(gzip);
+        super.writeTo(gzip);
         // Only close output stream if the wrapped entity has been
         // successfully written out
         gzip.close();

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/GzipDecompressingEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/GzipDecompressingEntity.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/GzipDecompressingEntity.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/GzipDecompressingEntity.java Tue Jan 12 20:43:36 2016
@@ -30,7 +30,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.zip.GZIPInputStream;
 
-import org.apache.http.HttpEntity;
+import org.apache.hc.core5.http.HttpEntity;
 
 /**
  * {@link org.apache.http.entity.HttpEntityWrapper} for handling gzip

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/LazyDecompressingInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/LazyDecompressingInputStream.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/LazyDecompressingInputStream.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/LazyDecompressingInputStream.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.client.entity;
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
 
 /**
  * Lazy init InputStream wrapper.

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/entity/UrlEncodedFormEntity.java Tue Jan 12 20:43:36 2016
@@ -27,14 +27,14 @@
 package org.apache.http.client.entity;
 
 import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
 import java.util.List;
 
-import org.apache.http.NameValuePair;
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
+import org.apache.hc.core5.http.NameValuePair;
+import org.apache.hc.core5.http.entity.ContentType;
+import org.apache.hc.core5.http.entity.StringEntity;
 import org.apache.http.client.utils.URLEncodedUtils;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.protocol.HTTP;
 
 /**
  * An entity composed of a list of url-encoded pairs.
@@ -58,13 +58,13 @@ public class UrlEncodedFormEntity extend
         final Iterable <? extends NameValuePair> parameters,
         final Charset charset) {
         super(URLEncodedUtils.format(parameters,
-                charset != null ? charset : HTTP.DEF_CONTENT_CHARSET),
+                charset != null ? charset : StandardCharsets.ISO_8859_1),
                 ContentType.create(URLEncodedUtils.CONTENT_TYPE, charset));
     }
 
     /**
      * Constructs a new {@link UrlEncodedFormEntity} with the list
-     * of parameters with the default encoding of {@link HTTP#DEFAULT_CONTENT_CHARSET}
+     * of parameters with the default encoding of {@link StandardCharsets#ISO_8859_1}
      *
      * @param parameters list of name/value pairs
      */
@@ -74,7 +74,7 @@ public class UrlEncodedFormEntity extend
 
     /**
      * Constructs a new {@link UrlEncodedFormEntity} with the list
-     * of parameters with the default encoding of {@link HTTP#DEFAULT_CONTENT_CHARSET}
+     * of parameters with the default encoding of {@link StandardCharsets#ISO_8859_1}
      *
      * @param parameters iterable collection of name/value pairs
      *

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/AbstractExecutionAwareRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/AbstractExecutionAwareRequest.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/AbstractExecutionAwareRequest.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/AbstractExecutionAwareRequest.java Tue Jan 12 20:43:36 2016
@@ -29,13 +29,11 @@ package org.apache.http.client.methods;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 
-import org.apache.http.HttpRequest;
-import org.apache.http.client.utils.CloneUtils;
-import org.apache.http.concurrent.Cancellable;
-import org.apache.http.message.AbstractHttpMessage;
+import org.apache.hc.core5.concurrent.Cancellable;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.message.AbstractHttpMessage;
 
-public abstract class AbstractExecutionAwareRequest extends AbstractHttpMessage implements
-        HttpExecutionAware, Cloneable, HttpRequest {
+public abstract class AbstractExecutionAwareRequest extends AbstractHttpMessage implements HttpExecutionAware, HttpRequest {
 
     private final AtomicBoolean aborted;
     private final AtomicReference<Cancellable> cancellableRef;
@@ -70,13 +68,6 @@ public abstract class AbstractExecutionA
         }
     }
 
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        final AbstractExecutionAwareRequest clone = (AbstractExecutionAwareRequest) super.clone();
-        clone.headergroup = CloneUtils.cloneObject(this.headergroup);
-        return clone;
-    }
-
     /**
      * @since 4.2
      */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/CloseableHttpResponse.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/CloseableHttpResponse.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/CloseableHttpResponse.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/CloseableHttpResponse.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.client.methods;
 
 import java.io.Closeable;
 
-import org.apache.http.HttpResponse;
+import org.apache.hc.core5.http.HttpResponse;
 
 /**
  * Extended version of the {@link HttpResponse} interface that also extends {@link Closeable}.

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpDelete.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpDelete.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpDelete.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpDelete.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.client.methods;
 
 import java.net.URI;
 
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
 
 /**
  * HTTP DELETE method

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpExecutionAware.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpExecutionAware.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpExecutionAware.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpExecutionAware.java Tue Jan 12 20:43:36 2016
@@ -27,7 +27,7 @@
 
 package org.apache.http.client.methods;
 
-import org.apache.http.concurrent.Cancellable;
+import org.apache.hc.core5.concurrent.Cancellable;
 
 /**
  * Interface to be implemented by any object that wishes to be notified of

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpGet.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpGet.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpGet.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpGet.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.client.methods;
 
 import java.net.URI;
 
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
 
 /**
  * HTTP GET method.

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpHead.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpHead.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpHead.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpHead.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.client.methods;
 
 import java.net.URI;
 
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
 
 /**
  * HTTP HEAD method.

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpOptions.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpOptions.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpOptions.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpOptions.java Tue Jan 12 20:43:36 2016
@@ -29,14 +29,14 @@ package org.apache.http.client.methods;
 
 import java.net.URI;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.Set;
 
-import org.apache.http.Header;
-import org.apache.http.HeaderElement;
-import org.apache.http.HeaderIterator;
-import org.apache.http.HttpResponse;
-import org.apache.http.annotation.NotThreadSafe;
-import org.apache.http.util.Args;
+import org.apache.hc.core5.annotation.NotThreadSafe;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HeaderElement;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.util.Args;
 
 /**
  * HTTP OPTIONS method.
@@ -85,10 +85,10 @@ public class HttpOptions extends HttpReq
     public Set<String> getAllowedMethods(final HttpResponse response) {
         Args.notNull(response, "HTTP response");
 
-        final HeaderIterator it = response.headerIterator("Allow");
+        final Iterator<Header> it = response.headerIterator("Allow");
         final Set<String> methods = new HashSet<>();
         while (it.hasNext()) {
-            final Header header = it.nextHeader();
+            final Header header = it.next();
             final HeaderElement[] elements = header.getElements();
             for (final HeaderElement element : elements) {
                 methods.add(element.getName());

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpPatch.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpPatch.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpPatch.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpPatch.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.client.methods;
 
 import java.net.URI;
 
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
 
 /**
  * HTTP PATCH method.
@@ -51,7 +51,7 @@ import org.apache.http.annotation.NotThr
  * @since 4.2
  */
 @NotThreadSafe
-public class HttpPatch extends HttpEntityEnclosingRequestBase {
+public class HttpPatch extends HttpRequestBase {
 
     public final static String METHOD_NAME = "PATCH";
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpPost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpPost.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpPost.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpPost.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.client.methods;
 
 import java.net.URI;
 
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
 
 /**
  * HTTP POST method.
@@ -55,7 +55,7 @@ import org.apache.http.annotation.NotThr
  * @since 4.0
  */
 @NotThreadSafe
-public class HttpPost extends HttpEntityEnclosingRequestBase {
+public class HttpPost extends HttpRequestBase {
 
     public final static String METHOD_NAME = "POST";
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpPut.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpPut.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpPut.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpPut.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.client.methods;
 
 import java.net.URI;
 
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
 
 /**
  * HTTP PUT method.
@@ -47,7 +47,7 @@ import org.apache.http.annotation.NotThr
  * @since 4.0
  */
 @NotThreadSafe
-public class HttpPut extends HttpEntityEnclosingRequestBase {
+public class HttpPut extends HttpRequestBase {
 
     public final static String METHOD_NAME = "PUT";
 

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=1724315&r1=1724314&r2=1724315&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 Tue Jan 12 20:43:36 2016
@@ -29,12 +29,12 @@ package org.apache.http.client.methods;
 
 import java.net.URI;
 
-import org.apache.http.ProtocolVersion;
-import org.apache.http.RequestLine;
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.ProtocolVersion;
+import org.apache.hc.core5.http.RequestLine;
+import org.apache.hc.core5.http.message.BasicRequestLine;
 import org.apache.http.client.config.RequestConfig;
-import org.apache.http.message.BasicRequestLine;
-import org.apache.http.params.HttpProtocolParams;
 
 /**
  * Base implementation of {@link HttpUriRequest}.
@@ -61,7 +61,7 @@ public abstract class HttpRequestBase ex
 
     @Override
     public ProtocolVersion getProtocolVersion() {
-        return version != null ? version : HttpProtocolParams.getVersion(getParams());
+        return version != null ? version : HttpVersion.HTTP_1_1;
     }
 
     /**
@@ -78,7 +78,7 @@ public abstract class HttpRequestBase ex
     @Override
     public RequestLine getRequestLine() {
         final String method = getMethod();
-        final ProtocolVersion ver = getProtocolVersion();
+        final ProtocolVersion ver = this.version != null ? this.version : HttpVersion.HTTP_1_1;
         final URI uriCopy = getURI(); // avoids possible window where URI could be changed
         String uritext = null;
         if (uriCopy != null) {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpRequestWrapper.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpRequestWrapper.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpRequestWrapper.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpRequestWrapper.java Tue Jan 12 20:43:36 2016
@@ -29,18 +29,15 @@ package org.apache.http.client.methods;
 
 import java.net.URI;
 
-import org.apache.http.Header;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpEntityEnclosingRequest;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.ProtocolVersion;
-import org.apache.http.RequestLine;
-import org.apache.http.annotation.NotThreadSafe;
-import org.apache.http.message.AbstractHttpMessage;
-import org.apache.http.message.BasicRequestLine;
-import org.apache.http.protocol.HTTP;
-import org.apache.http.util.Args;
+import org.apache.hc.core5.annotation.NotThreadSafe;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpHost;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.ProtocolVersion;
+import org.apache.hc.core5.http.RequestLine;
+import org.apache.hc.core5.http.message.AbstractHttpMessage;
+import org.apache.hc.core5.http.message.BasicRequestLine;
+import org.apache.hc.core5.util.Args;
 
 /**
  * A wrapper class for {@link HttpRequest} that can be used to change properties of the current
@@ -57,6 +54,7 @@ public class HttpRequestWrapper extends
     private RequestLine requestLine;
     private ProtocolVersion version;
     private URI uri;
+    private HttpEntity entity;
 
     private HttpRequestWrapper(final HttpRequest request, final HttpHost target) {
         super();
@@ -70,6 +68,7 @@ public class HttpRequestWrapper extends
             this.uri = null;
         }
         setHeaders(request.getAllHeaders());
+        this.entity = request.getEntity();
     }
 
     @Override
@@ -124,6 +123,16 @@ public class HttpRequestWrapper extends
         return this.requestLine;
     }
 
+    @Override
+    public HttpEntity getEntity() {
+        return this.entity;
+    }
+
+    @Override
+    public void setEntity(final HttpEntity entity) {
+        this.entity = entity;
+    }
+
     public HttpRequest getOriginal() {
         return this.original;
     }
@@ -137,35 +146,7 @@ public class HttpRequestWrapper extends
 
     @Override
     public String toString() {
-        return getRequestLine() + " " + this.headergroup;
-    }
-
-    static class HttpEntityEnclosingRequestWrapper extends HttpRequestWrapper
-        implements HttpEntityEnclosingRequest {
-
-        private HttpEntity entity;
-
-        HttpEntityEnclosingRequestWrapper(final HttpEntityEnclosingRequest request, final HttpHost target) {
-            super(request, target);
-            this.entity = request.getEntity();
-        }
-
-        @Override
-        public HttpEntity getEntity() {
-            return this.entity;
-        }
-
-        @Override
-        public void setEntity(final HttpEntity entity) {
-            this.entity = entity;
-        }
-
-        @Override
-        public boolean expectContinue() {
-            final Header expect = getFirstHeader(HTTP.EXPECT_DIRECTIVE);
-            return expect != null && HTTP.EXPECT_CONTINUE.equalsIgnoreCase(expect.getValue());
-        }
-
+        return getRequestLine() + " " + super.toString();
     }
 
     /**
@@ -174,26 +155,8 @@ public class HttpRequestWrapper extends
      * @param request original request
      * @return mutable request wrappering the original one
      */
-    public static HttpRequestWrapper wrap(final HttpRequest request) {
-        return wrap(request, null);
-    }
-
-
-    /**
-     * Creates a mutable wrapper of the original request.
-     *
-     * @param request original request
-     * @param target original target, if explicitly specified
-     * @return mutable request wrappering the original one
-     * @since 4.4
-     */
     public static HttpRequestWrapper wrap(final HttpRequest request, final HttpHost target) {
-        Args.notNull(request, "HTTP request");
-        if (request instanceof HttpEntityEnclosingRequest) {
-            return new HttpEntityEnclosingRequestWrapper((HttpEntityEnclosingRequest) request, target);
-        } else {
-            return new HttpRequestWrapper(request, target);
-        }
+        return new HttpRequestWrapper(request, target);
     }
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpTrace.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpTrace.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpTrace.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/methods/HttpTrace.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.client.methods;
 
 import java.net.URI;
 
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
 
 /**
  * HTTP TRACE method.

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=1724315&r1=1724314&r2=1724315&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 Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.client.methods;
 
 import java.net.URI;
 
-import org.apache.http.HttpRequest;
+import org.apache.hc.core5.http.HttpRequest;
 
 /**
  * Extended version of the {@link HttpRequest} interface that provides

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=1724315&r1=1724314&r2=1724315&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 Tue Jan 12 20:43:36 2016
@@ -31,36 +31,35 @@ import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 
-import org.apache.http.Consts;
-import org.apache.http.Header;
-import org.apache.http.HeaderIterator;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpEntityEnclosingRequest;
-import org.apache.http.HttpRequest;
-import org.apache.http.NameValuePair;
-import org.apache.http.ProtocolVersion;
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.NameValuePair;
+import org.apache.hc.core5.http.ProtocolVersion;
+import org.apache.hc.core5.http.entity.ContentType;
+import org.apache.hc.core5.http.message.BasicHeader;
+import org.apache.hc.core5.http.message.BasicNameValuePair;
+import org.apache.hc.core5.http.message.HeaderGroup;
+import org.apache.hc.core5.util.Args;
 import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.entity.UrlEncodedFormEntity;
 import org.apache.http.client.utils.URIBuilder;
 import org.apache.http.client.utils.URLEncodedUtils;
-import org.apache.http.entity.ContentType;
-import org.apache.http.message.BasicHeader;
-import org.apache.http.message.BasicNameValuePair;
-import org.apache.http.message.HeaderGroup;
-import org.apache.http.protocol.HTTP;
-import org.apache.http.util.Args;
 
 /**
  * Builder for {@link HttpUriRequest} instances.
  * <p>
  * Please note that this class treats parameters differently depending on composition
  * of the request: if the request has a content entity explicitly set with
- * {@link #setEntity(org.apache.http.HttpEntity)} or it is not an entity enclosing method
+ * {@link #setEntity(org.apache.hc.core5.http.HttpEntity)} or it is not an entity enclosing method
  * (such as POST or PUT), parameters will be added to the query component of the request URI.
  * Otherwise, parameters will be added as a URL encoded {@link UrlEncodedFormEntity entity}.
  * </p>
@@ -81,7 +80,7 @@ public class RequestBuilder {
 
     RequestBuilder(final String method) {
         super();
-        this.charset = Consts.UTF_8;
+        this.charset = StandardCharsets.UTF_8;
         this.method = method;
     }
 
@@ -274,21 +273,19 @@ public class RequestBuilder {
         parameters = null;
         entity = null;
 
-        if (request instanceof HttpEntityEnclosingRequest) {
-            final HttpEntity originalEntity = ((HttpEntityEnclosingRequest) request).getEntity();
-            final ContentType contentType = ContentType.get(originalEntity);
-            if (contentType != null &&
-                    contentType.getMimeType().equals(ContentType.APPLICATION_FORM_URLENCODED.getMimeType())) {
-                try {
-                    final List<NameValuePair> formParams = URLEncodedUtils.parse(originalEntity);
-                    if (!formParams.isEmpty()) {
-                        parameters = formParams;
-                    }
-                } catch (IOException ignore) {
+        final HttpEntity originalEntity = request.getEntity();
+        final ContentType contentType = ContentType.get(originalEntity);
+        if (contentType != null &&
+                contentType.getMimeType().equals(ContentType.APPLICATION_FORM_URLENCODED.getMimeType())) {
+            try {
+                final List<NameValuePair> formParams = URLEncodedUtils.parse(originalEntity);
+                if (!formParams.isEmpty()) {
+                    parameters = formParams;
                 }
-            } else {
-                entity = originalEntity;
+            } catch (IOException ignore) {
             }
+        } else {
+            entity = originalEntity;
         }
 
         final URI originalUri;
@@ -388,8 +385,8 @@ public class RequestBuilder {
         if (name == null || headergroup == null) {
             return this;
         }
-        for (final HeaderIterator i = headergroup.iterator(); i.hasNext(); ) {
-            final Header header = i.nextHeader();
+        for (final Iterator<Header> i = headergroup.headerIterator(); i.hasNext(); ) {
+            final Header header = i.next();
             if (name.equalsIgnoreCase(header.getName())) {
                 i.remove();
             }
@@ -401,7 +398,7 @@ public class RequestBuilder {
         if (headergroup == null) {
             headergroup = new HeaderGroup();
         }
-        this.headergroup.updateHeader(header);
+        this.headergroup.setHeader(header);
         return this;
     }
 
@@ -409,7 +406,7 @@ public class RequestBuilder {
         if (headergroup == null) {
             headergroup = new HeaderGroup();
         }
-        this.headergroup.updateHeader(new BasicHeader(name, value));
+        this.headergroup.setHeader(new BasicHeader(name, value));
         return this;
     }
 
@@ -463,7 +460,7 @@ public class RequestBuilder {
         if (parameters != null && !parameters.isEmpty()) {
             if (entityCopy == null && (HttpPost.METHOD_NAME.equalsIgnoreCase(method)
                     || HttpPut.METHOD_NAME.equalsIgnoreCase(method))) {
-                entityCopy = new UrlEncodedFormEntity(parameters, charset != null ? charset : HTTP.DEF_CONTENT_CHARSET);
+                entityCopy = new UrlEncodedFormEntity(parameters, charset != null ? charset : StandardCharsets.ISO_8859_1);
             } else {
                 try {
                     uriNotNull = new URIBuilder(uriNotNull)
@@ -475,18 +472,13 @@ public class RequestBuilder {
                 }
             }
         }
-        if (entityCopy == null) {
-            result = new InternalRequest(method);
-        } else {
-            final InternalEntityEclosingRequest request = new InternalEntityEclosingRequest(method);
-            request.setEntity(entityCopy);
-            result = request;
-        }
-        result.setProtocolVersion(this.version);
+        result = new InternalRequest(method);
+        result.setProtocolVersion(this.version != null ? this.version : HttpVersion.HTTP_1_1);
         result.setURI(uriNotNull);
         if (this.headergroup != null) {
             result.setHeaders(this.headergroup.getAllHeaders());
         }
+        result.setEntity(entityCopy);
         result.setConfig(this.config);
         return result;
     }
@@ -499,22 +491,6 @@ public class RequestBuilder {
             super();
             this.method = method;
         }
-
-        @Override
-        public String getMethod() {
-            return this.method;
-        }
-
-    }
-
-    static class InternalEntityEclosingRequest extends HttpEntityEnclosingRequestBase {
-
-        private final String method;
-
-        InternalEntityEclosingRequest(final String method) {
-            super();
-            this.method = method;
-        }
 
         @Override
         public String getMethod() {

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=1724315&r1=1724314&r2=1724315&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 Tue Jan 12 20:43:36 2016
@@ -32,8 +32,12 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.http.HttpHost;
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
+import org.apache.hc.core5.http.HttpHost;
+import org.apache.hc.core5.http.config.Lookup;
+import org.apache.hc.core5.http.protocol.BasicHttpContext;
+import org.apache.hc.core5.http.protocol.HttpContext;
+import org.apache.hc.core5.http.protocol.HttpCoreContext;
 import org.apache.http.auth.AuthExchange;
 import org.apache.http.auth.AuthScheme;
 import org.apache.http.auth.AuthSchemeProvider;
@@ -41,15 +45,11 @@ import org.apache.http.auth.CredentialsP
 import org.apache.http.client.AuthCache;
 import org.apache.http.client.CookieStore;
 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;
 import org.apache.http.cookie.CookieOrigin;
 import org.apache.http.cookie.CookieSpec;
 import org.apache.http.cookie.CookieSpecProvider;
-import org.apache.http.protocol.BasicHttpContext;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.protocol.HttpCoreContext;
 
 /**
  * Adaptor class that provides convenience type safe setters and getters
@@ -74,7 +74,7 @@ public class HttpClientContext extends H
     public static final String REDIRECT_LOCATIONS = "http.protocol.redirect-locations";
 
     /**
-     * Attribute name of a {@link org.apache.http.config.Lookup} object that represents
+     * Attribute name of a {@link org.apache.hc.core5.http.config.Lookup} object that represents
      * the actual {@link CookieSpecProvider} registry.
      */
     public static final String COOKIESPEC_REGISTRY   = "http.cookiespec-registry";
@@ -111,7 +111,7 @@ public class HttpClientContext extends H
 
     /**
      * Attribute name of a map containing actual {@link AuthExchange}s keyed by their respective
-     * {@link org.apache.http.HttpHost}.
+     * {@link org.apache.hc.core5.http.HttpHost}.
      */
     public static final String AUTH_EXCHANGE_MAP     = "http.auth.exchanges";
 
@@ -122,7 +122,7 @@ public class HttpClientContext extends H
     public static final String USER_TOKEN            = "http.user-token";
 
     /**
-     * Attribute name of a {@link org.apache.http.config.Lookup} object that represents
+     * Attribute name of a {@link org.apache.hc.core5.http.config.Lookup} object that represents
      * the actual {@link AuthSchemeProvider} registry.
      */
     public static final String AUTHSCHEME_REGISTRY   = "http.authscheme-registry";




Mime
View raw message