hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1724315 [2/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-cache/src/main/java/org/apache/http/client/cache/HttpCacheInvalidator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheInvalidator.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheInvalidator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/HttpCacheInvalidator.java Tue Jan 12 20:43:36 2016
@@ -26,9 +26,9 @@
  */
 package org.apache.http.client.cache;
 
-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;
 
 /**
  * Given a particular HttpRequest, flush any cache entries that this request

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/InputLimit.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/InputLimit.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/InputLimit.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/client/cache/InputLimit.java Tue Jan 12 20:43:36 2016
@@ -26,7 +26,7 @@
  */
 package org.apache.http.client.cache;
 
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
 
 /**
  * Used to limiting the size of an incoming response body of

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidationRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidationRequest.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidationRequest.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidationRequest.java Tue Jan 12 20:43:36 2016
@@ -30,14 +30,14 @@ import java.io.IOException;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.http.Header;
-import org.apache.http.HttpException;
-import org.apache.http.HttpResponse;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpResponse;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.cache.HttpCacheEntry;
+import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpExecutionAware;
 import org.apache.http.client.methods.HttpRequestWrapper;
-import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.protocol.HttpClientContext;
 import org.apache.http.conn.routing.HttpRoute;
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCache.java Tue Jan 12 20:43:36 2016
@@ -36,12 +36,15 @@ import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.http.Header;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.HttpVersion;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpHeaders;
+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.HttpStatus;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.entity.ByteArrayEntity;
+import org.apache.hc.core5.http.message.BasicHttpResponse;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.cache.HttpCacheInvalidator;
@@ -52,9 +55,6 @@ import org.apache.http.client.cache.Reso
 import org.apache.http.client.cache.ResourceFactory;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpRequestWrapper;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.protocol.HTTP;
 
 class BasicHttpCache implements HttpCache {
     private static final Set<String> safeRequestMethods = new HashSet<>(
@@ -199,7 +199,7 @@ class BasicHttpCache implements HttpCach
             && status != HttpStatus.SC_PARTIAL_CONTENT) {
             return false;
         }
-        final Header hdr = resp.getFirstHeader(HTTP.CONTENT_LEN);
+        final Header hdr = resp.getFirstHeader(HttpHeaders.CONTENT_LENGTH);
         if (hdr == null) {
             return false;
         }
@@ -217,7 +217,7 @@ class BasicHttpCache implements HttpCach
 
     CloseableHttpResponse generateIncompleteResponseError(
             final HttpResponse response, final Resource resource) {
-        final Integer contentLength = Integer.valueOf(response.getFirstHeader(HTTP.CONTENT_LEN).getValue());
+        final Integer contentLength = Integer.valueOf(response.getFirstHeader(HttpHeaders.CONTENT_LENGTH).getValue());
         final HttpResponse error =
             new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_BAD_GATEWAY, "Bad Gateway");
         error.setHeader("Content-Type","text/plain;charset=UTF-8");

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCacheStorage.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCacheStorage.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCacheStorage.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicHttpCacheStorage.java Tue Jan 12 20:43:36 2016
@@ -28,7 +28,7 @@ package org.apache.http.impl.client.cach
 
 import java.io.IOException;
 
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.ThreadSafe;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.cache.HttpCacheStorage;
 import org.apache.http.client.cache.HttpCacheUpdateCallback;

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/BasicIdGenerator.java Tue Jan 12 20:43:36 2016
@@ -33,8 +33,8 @@ import java.security.SecureRandom;
 import java.util.Formatter;
 import java.util.Locale;
 
-import org.apache.http.annotation.GuardedBy;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.GuardedBy;
+import org.apache.hc.core5.annotation.ThreadSafe;
 
 /**
  * Should produce reasonably unique tokens.

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheConfig.java Tue Jan 12 20:43:36 2016
@@ -26,7 +26,7 @@
  */
 package org.apache.http.impl.client.cache;
 
-import org.apache.http.util.Args;
+import org.apache.hc.core5.util.Args;
 
 /**
  * <p>Java Beans-style configuration for caching {@link org.apache.http.client.HttpClient}.

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntity.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntity.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntity.java Tue Jan 12 20:43:36 2016
@@ -30,13 +30,15 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.Serializable;
+import java.util.Set;
 
-import org.apache.http.Header;
-import org.apache.http.HttpEntity;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.TrailerSupplier;
+import org.apache.hc.core5.util.Args;
 import org.apache.http.client.cache.HttpCacheEntry;
-import org.apache.http.protocol.HTTP;
-import org.apache.http.util.Args;
 
 @Immutable
 class CacheEntity implements HttpEntity, Serializable {
@@ -51,13 +53,15 @@ class CacheEntity implements HttpEntity,
     }
 
     @Override
-    public Header getContentType() {
-        return this.cacheEntry.getFirstHeader(HTTP.CONTENT_TYPE);
+    public String getContentType() {
+        final Header header = this.cacheEntry.getFirstHeader(HttpHeaders.CONTENT_TYPE);
+        return header != null ? header.getValue() : null;
     }
 
     @Override
-    public Header getContentEncoding() {
-        return this.cacheEntry.getFirstHeader(HTTP.CONTENT_ENCODING);
+    public String getContentEncoding() {
+        final Header header = this.cacheEntry.getFirstHeader(HttpHeaders.CONTENT_ENCODING);
+        return header != null ? header.getValue() : null;
     }
 
     @Override
@@ -94,7 +98,13 @@ class CacheEntity implements HttpEntity,
     }
 
     @Override
-    public void consumeContent() throws IOException {
+    public TrailerSupplier getTrailers() {
+        return null;
+    }
+
+    @Override
+    public Set<String> getTrailerNames() {
+        return null;
     }
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntryUpdater.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntryUpdater.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntryUpdater.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntryUpdater.java Tue Jan 12 20:43:36 2016
@@ -33,17 +33,17 @@ import java.util.Date;
 import java.util.List;
 import java.util.ListIterator;
 
-import org.apache.http.Header;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.util.Args;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.cache.Resource;
 import org.apache.http.client.cache.ResourceFactory;
 import org.apache.http.client.utils.DateUtils;
-import org.apache.http.protocol.HTTP;
-import org.apache.http.util.Args;
 
 /**
  * Update a {@link HttpCacheEntry} with new or updated information based on the latest
@@ -149,9 +149,9 @@ class CacheEntryUpdater {
     }
 
     private boolean entryDateHeaderNewerThenResponse(final HttpCacheEntry entry, final HttpResponse response) {
-        final Date entryDate = DateUtils.parseDate(entry.getFirstHeader(HTTP.DATE_HEADER)
+        final Date entryDate = DateUtils.parseDate(entry.getFirstHeader(HttpHeaders.DATE)
                 .getValue());
-        final Date responseDate = DateUtils.parseDate(response.getFirstHeader(HTTP.DATE_HEADER)
+        final Date responseDate = DateUtils.parseDate(response.getFirstHeader(HttpHeaders.DATE)
                 .getValue());
         if (entryDate == null || responseDate == null) {
             return false;
@@ -163,8 +163,8 @@ class CacheEntryUpdater {
     }
 
     private boolean entryAndResponseHaveDateHeader(final HttpCacheEntry entry, final HttpResponse response) {
-        if (entry.getFirstHeader(HTTP.DATE_HEADER) != null
-                && response.getFirstHeader(HTTP.DATE_HEADER) != null) {
+        if (entry.getFirstHeader(HttpHeaders.DATE) != null
+                && response.getFirstHeader(HttpHeaders.DATE) != null) {
             return true;
         }
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheInvalidator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheInvalidator.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheInvalidator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheInvalidator.java Tue Jan 12 20:43:36 2016
@@ -33,17 +33,17 @@ import java.util.Date;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.http.Header;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.HttpHost;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpResponse;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.cache.HttpCacheInvalidator;
 import org.apache.http.client.cache.HttpCacheStorage;
 import org.apache.http.client.utils.DateUtils;
-import org.apache.http.protocol.HTTP;
 
 /**
  * Given a particular HttpRequest, flush any cache entries that this request
@@ -282,8 +282,8 @@ class CacheInvalidator implements HttpCa
 
     private boolean responseDateOlderThanEntryDate(final HttpResponse response,
             final HttpCacheEntry entry) {
-        final Header entryDateHeader = entry.getFirstHeader(HTTP.DATE_HEADER);
-        final Header responseDateHeader = response.getFirstHeader(HTTP.DATE_HEADER);
+        final Header entryDateHeader = entry.getFirstHeader(HttpHeaders.DATE);
+        final Header responseDateHeader = response.getFirstHeader(HttpHeaders.DATE);
         if (entryDateHeader == null || responseDateHeader == null) {
             /* be conservative; should probably flush */
             return false;

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java Tue Jan 12 20:43:36 2016
@@ -31,16 +31,16 @@ import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URL;
 import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.http.Consts;
-import org.apache.http.Header;
-import org.apache.http.HeaderElement;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HeaderElement;
+import org.apache.hc.core5.http.HttpHost;
+import org.apache.hc.core5.http.HttpRequest;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.utils.URIUtils;
@@ -162,10 +162,10 @@ class CacheKeyGenerator {
                 if (!first) {
                     buf.append("&");
                 }
-                buf.append(URLEncoder.encode(headerName, Consts.UTF_8.name()));
+                buf.append(URLEncoder.encode(headerName, StandardCharsets.UTF_8.name()));
                 buf.append("=");
                 buf.append(URLEncoder.encode(getFullHeaderValue(req.getHeaders(headerName)),
-                        Consts.UTF_8.name()));
+                        StandardCharsets.UTF_8.name()));
                 first = false;
             }
             buf.append("}");

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheValidityPolicy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheValidityPolicy.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheValidityPolicy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheValidityPolicy.java Tue Jan 12 20:43:36 2016
@@ -28,14 +28,14 @@ package org.apache.http.impl.client.cach
 
 import java.util.Date;
 
-import org.apache.http.Header;
-import org.apache.http.HeaderElement;
-import org.apache.http.HttpRequest;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HeaderElement;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.HttpRequest;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.utils.DateUtils;
-import org.apache.http.protocol.HTTP;
 
 /**
  * @since 4.1
@@ -180,7 +180,7 @@ class CacheValidityPolicy {
     }
 
     protected long getContentLengthValue(final HttpCacheEntry entry) {
-        final Header cl = entry.getFirstHeader(HTTP.CONTENT_LEN);
+        final Header cl = entry.getFirstHeader(HttpHeaders.CONTENT_LENGTH);
         if (cl == null) {
             return -1;
         }
@@ -193,7 +193,7 @@ class CacheValidityPolicy {
     }
 
     protected boolean hasContentLengthHeader(final HttpCacheEntry entry) {
-        return null != entry.getFirstHeader(HTTP.CONTENT_LEN);
+        return null != entry.getFirstHeader(HttpHeaders.CONTENT_LENGTH);
     }
 
     /**

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheableRequestPolicy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheableRequestPolicy.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheableRequestPolicy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheableRequestPolicy.java Tue Jan 12 20:43:36 2016
@@ -28,12 +28,12 @@ package org.apache.http.impl.client.cach
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.http.Header;
-import org.apache.http.HeaderElement;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpVersion;
-import org.apache.http.ProtocolVersion;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HeaderElement;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.ProtocolVersion;
 import org.apache.http.client.cache.HeaderConstants;
 
 /**

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachedHttpResponseGenerator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachedHttpResponseGenerator.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachedHttpResponseGenerator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachedHttpResponseGenerator.java Tue Jan 12 20:43:36 2016
@@ -28,20 +28,20 @@ package org.apache.http.impl.client.cach
 
 import java.util.Date;
 
-import org.apache.http.Header;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.HttpVersion;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.message.BasicHeader;
+import org.apache.hc.core5.http.message.BasicHttpResponse;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpRequestWrapper;
 import org.apache.http.client.utils.DateUtils;
-import org.apache.http.message.BasicHeader;
-import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.protocol.HTTP;
 
 /**
  * Rebuilds an {@link HttpResponse} from a {@link net.sf.ehcache.CacheEntry}
@@ -63,7 +63,7 @@ class CachedHttpResponseGenerator {
     }
 
     /**
-     * If I was able to use a {@link CacheEntity} to response to the {@link org.apache.http.HttpRequest} then
+     * If I was able to use a {@link CacheEntity} to response to the {@link org.apache.hc.core5.http.HttpRequest} then
      * generate an {@link HttpResponse} based on the cache entry.
      * @param request {@link HttpRequestWrapper} to generate the response for
      * @param entry {@link CacheEntity} to transform into an {@link HttpResponse}
@@ -107,9 +107,9 @@ class CachedHttpResponseGenerator {
         //  (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html)
 
         // - Date, unless its omission is required by section 14.8.1
-        Header dateHeader = entry.getFirstHeader(HTTP.DATE_HEADER);
+        Header dateHeader = entry.getFirstHeader(HttpHeaders.DATE);
         if (dateHeader == null) {
-             dateHeader = new BasicHeader(HTTP.DATE_HEADER, DateUtils.formatDate(new Date()));
+             dateHeader = new BasicHeader(HttpHeaders.DATE, DateUtils.formatDate(new Date()));
         }
         response.addHeader(dateHeader);
 
@@ -151,16 +151,16 @@ class CachedHttpResponseGenerator {
             return;
         }
 
-        Header contentLength = response.getFirstHeader(HTTP.CONTENT_LEN);
+        Header contentLength = response.getFirstHeader(HttpHeaders.CONTENT_LENGTH);
         if (contentLength == null) {
-            contentLength = new BasicHeader(HTTP.CONTENT_LEN, Long.toString(entity
+            contentLength = new BasicHeader(HttpHeaders.CONTENT_LENGTH, Long.toString(entity
                     .getContentLength()));
             response.setHeader(contentLength);
         }
     }
 
     private boolean transferEncodingIsPresent(final HttpResponse response) {
-        final Header hdr = response.getFirstHeader(HTTP.TRANSFER_ENCODING);
+        final Header hdr = response.getFirstHeader(HttpHeaders.TRANSFER_ENCODING);
         return hdr != null;
     }
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachedResponseSuitabilityChecker.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachedResponseSuitabilityChecker.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachedResponseSuitabilityChecker.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachedResponseSuitabilityChecker.java Tue Jan 12 20:43:36 2016
@@ -30,12 +30,12 @@ import java.util.Date;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.http.Header;
-import org.apache.http.HeaderElement;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpStatus;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HeaderElement;
+import org.apache.hc.core5.http.HttpHost;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpStatus;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.utils.DateUtils;

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java Tue Jan 12 20:43:36 2016
@@ -37,19 +37,25 @@ import java.util.concurrent.atomic.Atomi
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.http.Header;
-import org.apache.http.HeaderElement;
-import org.apache.http.HttpException;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpMessage;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.HttpVersion;
-import org.apache.http.ProtocolException;
-import org.apache.http.ProtocolVersion;
-import org.apache.http.RequestLine;
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HeaderElement;
+import org.apache.hc.core5.http.HttpException;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.HttpHost;
+import org.apache.hc.core5.http.HttpMessage;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.ProtocolException;
+import org.apache.hc.core5.http.ProtocolVersion;
+import org.apache.hc.core5.http.RequestLine;
+import org.apache.hc.core5.http.message.BasicHttpResponse;
+import org.apache.hc.core5.http.protocol.HttpContext;
+import org.apache.hc.core5.http.protocol.HttpCoreContext;
+import org.apache.hc.core5.util.Args;
+import org.apache.hc.core5.util.VersionInfo;
 import org.apache.http.client.cache.CacheResponseStatus;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.cache.HttpCacheContext;
@@ -64,12 +70,6 @@ import org.apache.http.client.utils.Date
 import org.apache.http.client.utils.URIUtils;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.impl.execchain.ClientExecChain;
-import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.protocol.HTTP;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.protocol.HttpCoreContext;
-import org.apache.http.util.Args;
-import org.apache.http.util.VersionInfo;
 
 /**
  * <p>
@@ -306,7 +306,6 @@ public class CachingExec implements Clie
         context.setAttribute(HttpCoreContext.HTTP_TARGET_HOST, target);
         context.setAttribute(HttpCoreContext.HTTP_REQUEST, request);
         context.setAttribute(HttpCoreContext.HTTP_RESPONSE, out);
-        context.setAttribute(HttpCoreContext.HTTP_REQ_SENT, Boolean.TRUE);
         return out;
     }
 
@@ -602,8 +601,8 @@ public class CachingExec implements Clie
 
     private boolean revalidationResponseIsTooOld(final HttpResponse backendResponse,
             final HttpCacheEntry cacheEntry) {
-        final Header entryDateHeader = cacheEntry.getFirstHeader(HTTP.DATE_HEADER);
-        final Header responseDateHeader = backendResponse.getFirstHeader(HTTP.DATE_HEADER);
+        final Header entryDateHeader = cacheEntry.getFirstHeader(HttpHeaders.DATE);
+        final Header responseDateHeader = backendResponse.getFirstHeader(HttpHeaders.DATE);
         if (entryDateHeader != null && responseDateHeader != null) {
             final Date entryDate = DateUtils.parseDate(entryDateHeader.getValue());
             final Date respDate = DateUtils.parseDate(responseDateHeader.getValue());
@@ -866,11 +865,11 @@ public class CachingExec implements Clie
         if (existing == null) {
             return false;
         }
-        final Header entryDateHeader = existing.getFirstHeader(HTTP.DATE_HEADER);
+        final Header entryDateHeader = existing.getFirstHeader(HttpHeaders.DATE);
         if (entryDateHeader == null) {
             return false;
         }
-        final Header responseDateHeader = backendResponse.getFirstHeader(HTTP.DATE_HEADER);
+        final Header responseDateHeader = backendResponse.getFirstHeader(HttpHeaders.DATE);
         if (responseDateHeader == null) {
             return false;
         }

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClients.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClients.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClients.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpClients.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.impl.client.cach
 
 import java.io.File;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 import org.apache.http.impl.client.CloseableHttpClient;
 
 /**

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CombinedEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CombinedEntity.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CombinedEntity.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CombinedEntity.java Tue Jan 12 20:43:36 2016
@@ -32,10 +32,10 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.SequenceInputStream;
 
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
+import org.apache.hc.core5.http.entity.AbstractHttpEntity;
+import org.apache.hc.core5.util.Args;
 import org.apache.http.client.cache.Resource;
-import org.apache.http.entity.AbstractHttpEntity;
-import org.apache.http.util.Args;
 
 @NotThreadSafe
 class CombinedEntity extends AbstractHttpEntity {

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ConditionalRequestBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ConditionalRequestBuilder.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ConditionalRequestBuilder.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ConditionalRequestBuilder.java Tue Jan 12 20:43:36 2016
@@ -28,10 +28,10 @@ package org.apache.http.impl.client.cach
 
 import java.util.Map;
 
-import org.apache.http.Header;
-import org.apache.http.HeaderElement;
-import org.apache.http.ProtocolException;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HeaderElement;
+import org.apache.hc.core5.http.ProtocolException;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.methods.HttpRequestWrapper;
@@ -44,8 +44,8 @@ class ConditionalRequestBuilder {
 
     /**
      * When a {@link HttpCacheEntry} is stale but 'might' be used as a response
-     * to an {@link org.apache.http.HttpRequest} we will attempt to revalidate
-     * the entry with the origin.  Build the origin {@link org.apache.http.HttpRequest}
+     * to an {@link org.apache.hc.core5.http.HttpRequest} we will attempt to revalidate
+     * the entry with the origin.  Build the origin {@link org.apache.hc.core5.http.HttpRequest}
      * here and return it.
      *
      * @param request the original request from the caller
@@ -55,7 +55,7 @@ class ConditionalRequestBuilder {
      */
     public HttpRequestWrapper buildConditionalRequest(final HttpRequestWrapper request, final HttpCacheEntry cacheEntry)
             throws ProtocolException {
-        final HttpRequestWrapper newRequest = HttpRequestWrapper.wrap(request.getOriginal());
+        final HttpRequestWrapper newRequest = HttpRequestWrapper.wrap(request.getOriginal(), request.getTarget());
         newRequest.setHeaders(request.getAllHeaders());
         final Header eTag = cacheEntry.getFirstHeader(HeaderConstants.ETAG);
         if (eTag != null) {
@@ -84,9 +84,9 @@ class ConditionalRequestBuilder {
 
     /**
      * When a {@link HttpCacheEntry} does not exist for a specific
-     * {@link org.apache.http.HttpRequest} we attempt to see if an existing
+     * {@link org.apache.hc.core5.http.HttpRequest} we attempt to see if an existing
      * {@link HttpCacheEntry} is appropriate by building a conditional
-     * {@link org.apache.http.HttpRequest} using the variants' ETag values.
+     * {@link org.apache.hc.core5.http.HttpRequest} using the variants' ETag values.
      * If no such values exist, the request is unmodified
      *
      * @param request the original request from the caller
@@ -95,7 +95,7 @@ class ConditionalRequestBuilder {
      */
     public HttpRequestWrapper buildConditionalRequestFromVariants(final HttpRequestWrapper request,
             final Map<String, Variant> variants) {
-        final HttpRequestWrapper newRequest = HttpRequestWrapper.wrap(request.getOriginal());
+        final HttpRequestWrapper newRequest = HttpRequestWrapper.wrap(request.getOriginal(), request.getTarget());
         newRequest.setHeaders(request.getAllHeaders());
 
         // we do not support partial content so all etags are used
@@ -125,7 +125,7 @@ class ConditionalRequestBuilder {
      * @return an unconditional validation request
      */
     public HttpRequestWrapper buildUnconditionalRequest(final HttpRequestWrapper request, final HttpCacheEntry entry) {
-        final HttpRequestWrapper newRequest = HttpRequestWrapper.wrap(request.getOriginal());
+        final HttpRequestWrapper newRequest = HttpRequestWrapper.wrap(request.getOriginal(), request.getTarget());
         newRequest.setHeaders(request.getAllHeaders());
         newRequest.addHeader(HeaderConstants.CACHE_CONTROL,HeaderConstants.CACHE_CONTROL_NO_CACHE);
         newRequest.addHeader(HeaderConstants.PRAGMA,HeaderConstants.CACHE_CONTROL_NO_CACHE);

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/DefaultFailureCache.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/DefaultFailureCache.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/DefaultFailureCache.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/DefaultFailureCache.java Tue Jan 12 20:43:36 2016
@@ -26,12 +26,12 @@
  */
 package org.apache.http.impl.client.cache;
 
-import org.apache.http.annotation.ThreadSafe;
-
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
+import org.apache.hc.core5.annotation.ThreadSafe;
+
 /**
  * Implements a bounded failure cache. The oldest entries are discarded when
  * the maximum size is exceeded.

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/DefaultHttpCacheEntrySerializer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/DefaultHttpCacheEntrySerializer.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/DefaultHttpCacheEntrySerializer.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/DefaultHttpCacheEntrySerializer.java Tue Jan 12 20:43:36 2016
@@ -32,7 +32,7 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.OutputStream;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.cache.HttpCacheEntrySerializationException;
 import org.apache.http.client.cache.HttpCacheEntrySerializer;

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ExponentialBackOffSchedulingStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ExponentialBackOffSchedulingStrategy.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ExponentialBackOffSchedulingStrategy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ExponentialBackOffSchedulingStrategy.java Tue Jan 12 20:43:36 2016
@@ -26,13 +26,13 @@
  */
 package org.apache.http.impl.client.cache;
 
-import org.apache.http.annotation.ThreadSafe;
-import org.apache.http.util.Args;
-
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.util.Args;
+
 /**
  * An implementation that backs off exponentially based on the number of
  * consecutive failed attempts stored in the

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FailureCacheValue.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FailureCacheValue.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FailureCacheValue.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FailureCacheValue.java Tue Jan 12 20:43:36 2016
@@ -26,7 +26,7 @@
  */
 package org.apache.http.impl.client.cache;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 
 /**
  * The error count with a creation timestamp and its associated key.

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResource.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResource.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResource.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResource.java Tue Jan 12 20:43:36 2016
@@ -31,7 +31,7 @@ import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.ThreadSafe;
 import org.apache.http.client.cache.Resource;
 
 /**

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResourceFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResourceFactory.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResourceFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/FileResourceFactory.java Tue Jan 12 20:43:36 2016
@@ -31,7 +31,7 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 import org.apache.http.client.cache.InputLimit;
 import org.apache.http.client.cache.Resource;
 import org.apache.http.client.cache.ResourceFactory;

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResource.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResource.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResource.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResource.java Tue Jan 12 20:43:36 2016
@@ -29,7 +29,7 @@ package org.apache.http.impl.client.cach
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 import org.apache.http.client.cache.Resource;
 
 /**

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java Tue Jan 12 20:43:36 2016
@@ -30,7 +30,7 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
 import org.apache.http.client.cache.InputLimit;
 import org.apache.http.client.cache.Resource;
 import org.apache.http.client.cache.ResourceFactory;

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HttpCache.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HttpCache.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HttpCache.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HttpCache.java Tue Jan 12 20:43:36 2016
@@ -30,9 +30,9 @@ import java.io.IOException;
 import java.util.Date;
 import java.util.Map;
 
-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.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.methods.CloseableHttpResponse;
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/IOUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/IOUtils.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/IOUtils.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/IOUtils.java Tue Jan 12 20:43:36 2016
@@ -34,8 +34,8 @@ import java.io.OutputStream;
 import java.io.RandomAccessFile;
 import java.nio.channels.FileChannel;
 
-import org.apache.http.HttpEntity;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.HttpEntity;
 
 @Immutable
 class IOUtils {

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ImmediateSchedulingStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ImmediateSchedulingStrategy.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ImmediateSchedulingStrategy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ImmediateSchedulingStrategy.java Tue Jan 12 20:43:36 2016
@@ -26,14 +26,14 @@
  */
 package org.apache.http.impl.client.cache;
 
-import org.apache.http.annotation.ThreadSafe;
-import org.apache.http.util.Args;
-
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.util.Args;
+
 /**
  * Immediately schedules any incoming validation request. Relies on
  * {@link CacheConfig} to configure the used {@link java.util.concurrent.ThreadPoolExecutor}.

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ManagedHttpCacheStorage.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ManagedHttpCacheStorage.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ManagedHttpCacheStorage.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ManagedHttpCacheStorage.java Tue Jan 12 20:43:36 2016
@@ -33,12 +33,12 @@ import java.util.HashSet;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import org.apache.http.annotation.ThreadSafe;
+import org.apache.hc.core5.annotation.ThreadSafe;
+import org.apache.hc.core5.util.Args;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.cache.HttpCacheStorage;
 import org.apache.http.client.cache.HttpCacheUpdateCallback;
 import org.apache.http.client.cache.Resource;
-import org.apache.http.util.Args;
 
 /**
  * <p>

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/OptionsHttp11Response.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/OptionsHttp11Response.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/OptionsHttp11Response.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/OptionsHttp11Response.java Tue Jan 12 20:43:36 2016
@@ -26,21 +26,19 @@
  */
 package org.apache.http.impl.client.cache;
 
+import java.util.Iterator;
 import java.util.Locale;
 
-import org.apache.http.Header;
-import org.apache.http.HeaderIterator;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.HttpVersion;
-import org.apache.http.ProtocolVersion;
-import org.apache.http.StatusLine;
-import org.apache.http.annotation.Immutable;
-import org.apache.http.message.AbstractHttpMessage;
-import org.apache.http.message.BasicStatusLine;
-import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpParams;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.ProtocolVersion;
+import org.apache.hc.core5.http.StatusLine;
+import org.apache.hc.core5.http.message.AbstractHttpMessage;
+import org.apache.hc.core5.http.message.BasicStatusLine;
 
 /**
  * @since 4.1
@@ -58,6 +56,11 @@ final class OptionsHttp11Response extend
     }
 
     @Override
+    public int getCode() {
+        return statusLine.getStatusCode();
+    }
+
+    @Override
     public void setStatusLine(final StatusLine statusline) {
         // No-op on purpose, this class is not going to be doing any work.
     }
@@ -109,27 +112,27 @@ final class OptionsHttp11Response extend
 
     @Override
     public boolean containsHeader(final String name) {
-        return this.headergroup.containsHeader(name);
+        return super.containsHeader(name);
     }
 
     @Override
     public Header[] getHeaders(final String name) {
-        return this.headergroup.getHeaders(name);
+        return super.getHeaders(name);
     }
 
     @Override
     public Header getFirstHeader(final String name) {
-        return this.headergroup.getFirstHeader(name);
+        return super.getFirstHeader(name);
     }
 
     @Override
     public Header getLastHeader(final String name) {
-        return this.headergroup.getLastHeader(name);
+        return super.getLastHeader(name);
     }
 
     @Override
     public Header[] getAllHeaders() {
-        return this.headergroup.getAllHeaders();
+        return super.getAllHeaders();
     }
 
     @Override
@@ -138,7 +141,7 @@ final class OptionsHttp11Response extend
     }
 
     @Override
-    public void addHeader(final String name, final String value) {
+    public void addHeader(final String name, final Object value) {
         // No-op on purpose, this class is not going to be doing any work.
     }
 
@@ -148,7 +151,7 @@ final class OptionsHttp11Response extend
     }
 
     @Override
-    public void setHeader(final String name, final String value) {
+    public void setHeader(final String name, final Object value) {
         // No-op on purpose, this class is not going to be doing any work.
     }
 
@@ -168,25 +171,14 @@ final class OptionsHttp11Response extend
     }
 
     @Override
-    public HeaderIterator headerIterator() {
-        return this.headergroup.iterator();
+    public Iterator<Header> headerIterator() {
+        return super.headerIterator();
     }
 
     @Override
-    public HeaderIterator headerIterator(final String name) {
-        return this.headergroup.iterator(name);
+    public Iterator<Header> headerIterator(final String name) {
+        return super.headerIterator(name);
     }
 
-    @Override
-    public HttpParams getParams() {
-        if (this.params == null) {
-            this.params = new BasicHttpParams();
-        }
-        return this.params;
-    }
 
-    @Override
-    public void setParams(final HttpParams params) {
-        // No-op on purpose, this class is not going to be doing any work.
-    }
 }

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/Proxies.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/Proxies.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/Proxies.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/Proxies.java Tue Jan 12 20:43:36 2016
@@ -28,10 +28,10 @@ package org.apache.http.impl.client.cach
 
 import java.lang.reflect.Proxy;
 
-import org.apache.http.HttpResponse;
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.util.Args;
 import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.util.Args;
 
 /**
  * Proxies for HTTP message objects.

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/RequestProtocolCompliance.java Tue Jan 12 20:43:36 2016
@@ -30,24 +30,25 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.http.Header;
-import org.apache.http.HeaderElement;
-import org.apache.http.HttpEntityEnclosingRequest;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.HttpVersion;
-import org.apache.http.ProtocolVersion;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HeaderElement;
+import org.apache.hc.core5.http.HeaderElements;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.ProtocolVersion;
+import org.apache.hc.core5.http.entity.AbstractHttpEntity;
+import org.apache.hc.core5.http.entity.ContentType;
+import org.apache.hc.core5.http.message.BasicHeader;
+import org.apache.hc.core5.http.message.BasicHttpResponse;
+import org.apache.hc.core5.http.message.BasicStatusLine;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.methods.HttpRequestWrapper;
-import org.apache.http.entity.AbstractHttpEntity;
-import org.apache.http.entity.ContentType;
-import org.apache.http.message.BasicHeader;
-import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.message.BasicStatusLine;
-import org.apache.http.protocol.HTTP;
 
 /**
  * @since 4.1
@@ -110,7 +111,7 @@ class RequestProtocolCompliance {
         throws ClientProtocolException {
 
         if (requestMustNotHaveEntity(request)) {
-            ((HttpEntityEnclosingRequest) request).setEntity(null);
+            request.setEntity(null);
         }
 
         verifyRequestWithExpectContinueFlagHas100continueHeader(request);
@@ -159,8 +160,7 @@ class RequestProtocolCompliance {
     }
 
     private boolean requestMustNotHaveEntity(final HttpRequest request) {
-        return HeaderConstants.TRACE_METHOD.equals(request.getRequestLine().getMethod())
-                && request instanceof HttpEntityEnclosingRequest;
+        return HeaderConstants.TRACE_METHOD.equals(request.getRequestLine().getMethod());
     }
 
     private void decrementOPTIONSMaxForwardsIfGreaterThen0(final HttpRequest request) {
@@ -184,29 +184,19 @@ class RequestProtocolCompliance {
             return;
         }
 
-        if (!(request instanceof HttpEntityEnclosingRequest)) {
-            return;
-        }
-
-        addContentTypeHeaderIfMissing((HttpEntityEnclosingRequest) request);
+        addContentTypeHeaderIfMissing(request);
     }
 
-    private void addContentTypeHeaderIfMissing(final HttpEntityEnclosingRequest request) {
-        if (request.getEntity().getContentType() == null) {
-            ((AbstractHttpEntity) request.getEntity()).setContentType(
-                    ContentType.APPLICATION_OCTET_STREAM.getMimeType());
+    private void addContentTypeHeaderIfMissing(final HttpRequest request) {
+        final HttpEntity entity = request.getEntity();
+        if (entity != null && entity.getContentType() == null) {
+            ((AbstractHttpEntity) entity).setContentType(ContentType.APPLICATION_OCTET_STREAM.getMimeType());
         }
     }
 
     private void verifyRequestWithExpectContinueFlagHas100continueHeader(final HttpRequest request) {
-        if (request instanceof HttpEntityEnclosingRequest) {
-
-            if (((HttpEntityEnclosingRequest) request).expectContinue()
-                    && ((HttpEntityEnclosingRequest) request).getEntity() != null) {
-                add100ContinueHeaderIfMissing(request);
-            } else {
-                remove100ContinueHeaderIfExists(request);
-            }
+        if (request.containsHeader(HttpHeaders.EXPECT) && request.getEntity() != null) {
+            add100ContinueHeaderIfMissing(request);
         } else {
             remove100ContinueHeaderIfExists(request);
         }
@@ -215,12 +205,12 @@ class RequestProtocolCompliance {
     private void remove100ContinueHeaderIfExists(final HttpRequest request) {
         boolean hasHeader = false;
 
-        final Header[] expectHeaders = request.getHeaders(HTTP.EXPECT_DIRECTIVE);
+        final Header[] expectHeaders = request.getHeaders(HttpHeaders.EXPECT);
         List<HeaderElement> expectElementsThatAreNot100Continue = new ArrayList<>();
 
         for (final Header h : expectHeaders) {
             for (final HeaderElement elt : h.getElements()) {
-                if (!(HTTP.EXPECT_CONTINUE.equalsIgnoreCase(elt.getName()))) {
+                if (!(HeaderElements.CONTINUE.equalsIgnoreCase(elt.getName()))) {
                     expectElementsThatAreNot100Continue.add(elt);
                 } else {
                     hasHeader = true;
@@ -230,7 +220,7 @@ class RequestProtocolCompliance {
             if (hasHeader) {
                 request.removeHeader(h);
                 for (final HeaderElement elt : expectElementsThatAreNot100Continue) {
-                    final BasicHeader newHeader = new BasicHeader(HTTP.EXPECT_DIRECTIVE, elt.getName());
+                    final BasicHeader newHeader = new BasicHeader(HeaderElements.CONTINUE, elt.getName());
                     request.addHeader(newHeader);
                 }
                 return;
@@ -243,16 +233,16 @@ class RequestProtocolCompliance {
     private void add100ContinueHeaderIfMissing(final HttpRequest request) {
         boolean hasHeader = false;
 
-        for (final Header h : request.getHeaders(HTTP.EXPECT_DIRECTIVE)) {
+        for (final Header h : request.getHeaders(HttpHeaders.EXPECT)) {
             for (final HeaderElement elt : h.getElements()) {
-                if (HTTP.EXPECT_CONTINUE.equalsIgnoreCase(elt.getName())) {
+                if (HeaderElements.CONTINUE.equalsIgnoreCase(elt.getName())) {
                     hasHeader = true;
                 }
             }
         }
 
         if (!hasHeader) {
-            request.addHeader(HTTP.EXPECT_DIRECTIVE, HTTP.EXPECT_CONTINUE);
+            request.addHeader(HttpHeaders.EXPECT, HeaderElements.CONTINUE);
         }
     }
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResourceReference.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResourceReference.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResourceReference.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResourceReference.java Tue Jan 12 20:43:36 2016
@@ -29,10 +29,10 @@ package org.apache.http.impl.client.cach
 import java.lang.ref.PhantomReference;
 import java.lang.ref.ReferenceQueue;
 
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.util.Args;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.cache.Resource;
-import org.apache.http.util.Args;
 
 @Immutable
 class ResourceReference extends PhantomReference<HttpCacheEntry> {

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseCachingPolicy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseCachingPolicy.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseCachingPolicy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseCachingPolicy.java Tue Jan 12 20:43:36 2016
@@ -33,17 +33,17 @@ import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.http.Header;
-import org.apache.http.HeaderElement;
-import org.apache.http.HttpMessage;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.HttpVersion;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HeaderElement;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.HttpMessage;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.HttpVersion;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.utils.DateUtils;
-import org.apache.http.protocol.HTTP;
 
 /**
  * Determines if an HttpResponse can be cached.
@@ -123,7 +123,7 @@ class ResponseCachingPolicy {
             return false;
         }
 
-        final Header contentLength = response.getFirstHeader(HTTP.CONTENT_LEN);
+        final Header contentLength = response.getFirstHeader(HttpHeaders.CONTENT_LENGTH);
         if (contentLength != null) {
             final int contentLengthValue = Integer.parseInt(contentLength.getValue());
             if (contentLengthValue > this.maxObjectSizeBytes) {
@@ -143,7 +143,7 @@ class ResponseCachingPolicy {
             return false;
         }
 
-        final Header[] dateHeaders = response.getHeaders(HTTP.DATE_HEADER);
+        final Header[] dateHeaders = response.getHeaders(HttpHeaders.DATE);
 
         if (dateHeaders.length != 1) {
             return false;
@@ -279,7 +279,7 @@ class ResponseCachingPolicy {
             return false;
         }
         final Header expiresHdr = response.getFirstHeader(HeaderConstants.EXPIRES);
-        final Header dateHdr = response.getFirstHeader(HTTP.DATE_HEADER);
+        final Header dateHdr = response.getFirstHeader(HttpHeaders.DATE);
         if (expiresHdr == null || dateHdr == null) {
             return false;
         }

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProtocolCompliance.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProtocolCompliance.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProtocolCompliance.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProtocolCompliance.java Tue Jan 12 20:43:36 2016
@@ -31,21 +31,21 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
-import org.apache.http.Header;
-import org.apache.http.HeaderElement;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpEntityEnclosingRequest;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.HttpVersion;
-import org.apache.http.annotation.Immutable;
+import org.apache.hc.core5.annotation.Immutable;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HeaderElement;
+import org.apache.hc.core5.http.HeaderElements;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpHeaders;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.message.BasicHeader;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.methods.HttpRequestWrapper;
 import org.apache.http.client.utils.DateUtils;
-import org.apache.http.message.BasicHeader;
-import org.apache.http.protocol.HTTP;
 
 /**
  * @since 4.1
@@ -99,7 +99,7 @@ class ResponseProtocolCompliance {
 
     private void warningsWithNonMatchingWarnDatesAreRemoved(
             final HttpResponse response) {
-        final Date responseDate = DateUtils.parseDate(response.getFirstHeader(HTTP.DATE_HEADER).getValue());
+        final Date responseDate = DateUtils.parseDate(response.getFirstHeader(HttpHeaders.DATE).getValue());
         if (responseDate == null) {
             return;
         }
@@ -131,7 +131,7 @@ class ResponseProtocolCompliance {
     }
 
     private void identityIsNotUsedInContentEncoding(final HttpResponse response) {
-        final Header[] hdrs = response.getHeaders(HTTP.CONTENT_ENCODING);
+        final Header[] hdrs = response.getHeaders(HttpHeaders.CONTENT_ENCODING);
         if (hdrs == null || hdrs.length == 0) {
             return;
         }
@@ -153,21 +153,21 @@ class ResponseProtocolCompliance {
             }
             final String newHeaderValue = buf.toString();
             if (!"".equals(newHeaderValue)) {
-                newHeaders.add(new BasicHeader(HTTP.CONTENT_ENCODING, newHeaderValue));
+                newHeaders.add(new BasicHeader(HttpHeaders.CONTENT_ENCODING, newHeaderValue));
             }
         }
         if (!modified) {
             return;
         }
-        response.removeHeaders(HTTP.CONTENT_ENCODING);
+        response.removeHeaders(HttpHeaders.CONTENT_ENCODING);
         for (final Header h : newHeaders) {
             response.addHeader(h);
         }
     }
 
     private void ensure206ContainsDateHeader(final HttpResponse response) {
-        if (response.getFirstHeader(HTTP.DATE_HEADER) == null) {
-            response.addHeader(HTTP.DATE_HEADER, DateUtils.formatDate(new Date()));
+        if (response.getFirstHeader(HttpHeaders.DATE) == null) {
+            response.addHeader(HttpHeaders.DATE, DateUtils.formatDate(new Date()));
         }
 
     }
@@ -193,15 +193,15 @@ class ResponseProtocolCompliance {
             return;
         }
 
-        if (response.getFirstHeader(HTTP.CONTENT_LEN) == null) {
-            response.addHeader(HTTP.CONTENT_LEN, "0");
+        if (response.getFirstHeader(HttpHeaders.CONTENT_LENGTH) == null) {
+            response.addHeader(HttpHeaders.CONTENT_LENGTH, "0");
         }
     }
 
     private void ensure304DoesNotContainExtraEntityHeaders(final HttpResponse response) {
-        final String[] disallowedEntityHeaders = { HeaderConstants.ALLOW, HTTP.CONTENT_ENCODING,
-                "Content-Language", HTTP.CONTENT_LEN, "Content-MD5",
-                "Content-Range", HTTP.CONTENT_TYPE, HeaderConstants.LAST_MODIFIED
+        final String[] disallowedEntityHeaders = { HeaderConstants.ALLOW, HttpHeaders.CONTENT_ENCODING,
+                "Content-Language", HttpHeaders.CONTENT_LENGTH, "Content-MD5",
+                "Content-Range", HttpHeaders.CONTENT_TYPE, HeaderConstants.LAST_MODIFIED
         };
         if (response.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_MODIFIED) {
             for(final String hdr : disallowedEntityHeaders) {
@@ -224,10 +224,9 @@ class ResponseProtocolCompliance {
         }
 
         final HttpRequest originalRequest = request.getOriginal();
-        if (originalRequest instanceof HttpEntityEnclosingRequest) {
-            if (((HttpEntityEnclosingRequest)originalRequest).expectContinue()) {
-                return;
-            }
+        final Header header = originalRequest.getFirstHeader(HttpHeaders.EXPECT);
+        if (header != null && header.getValue().equalsIgnoreCase(HeaderElements.CONTINUE)) {
+            return;
         }
         consumeBody(response);
         throw new ClientProtocolException(UNEXPECTED_100_CONTINUE);
@@ -245,7 +244,7 @@ class ResponseProtocolCompliance {
 
     private void removeResponseTransferEncoding(final HttpResponse response) {
         response.removeHeaders("TE");
-        response.removeHeaders(HTTP.TRANSFER_ENCODING);
+        response.removeHeaders(HttpHeaders.TRANSFER_ENCODING);
     }
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProxyHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProxyHandler.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProxyHandler.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ResponseProxyHandler.java Tue Jan 12 20:43:36 2016
@@ -33,8 +33,8 @@ import java.lang.reflect.InvocationHandl
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
-import org.apache.http.HttpResponse;
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
+import org.apache.hc.core5.http.HttpResponse;
 
 /**
  * A proxy class that can enhance an arbitrary {@link HttpResponse} with

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java Tue Jan 12 20:43:36 2016
@@ -30,15 +30,15 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.lang.reflect.Proxy;
 
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.annotation.NotThreadSafe;
+import org.apache.hc.core5.annotation.NotThreadSafe;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.message.BasicHttpResponse;
 import org.apache.http.client.cache.InputLimit;
 import org.apache.http.client.cache.Resource;
 import org.apache.http.client.cache.ResourceFactory;
 import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.message.BasicHttpResponse;
 
 /**
  * @since 4.1

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/WarningValue.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/WarningValue.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/WarningValue.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/WarningValue.java Tue Jan 12 20:43:36 2016
@@ -32,7 +32,7 @@ import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.http.Header;
+import org.apache.hc.core5.http.Header;
 import org.apache.http.client.utils.DateUtils;
 
 /** This class provides for parsing and understanding Warning headers. As

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/EhcacheHttpCacheStorage.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/EhcacheHttpCacheStorage.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/EhcacheHttpCacheStorage.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/ehcache/EhcacheHttpCacheStorage.java Tue Jan 12 20:43:36 2016
@@ -30,9 +30,6 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
-import net.sf.ehcache.Ehcache;
-import net.sf.ehcache.Element;
-
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.cache.HttpCacheEntrySerializer;
 import org.apache.http.client.cache.HttpCacheStorage;
@@ -41,6 +38,9 @@ import org.apache.http.client.cache.Http
 import org.apache.http.impl.client.cache.CacheConfig;
 import org.apache.http.impl.client.cache.DefaultHttpCacheEntrySerializer;
 
+import net.sf.ehcache.Ehcache;
+import net.sf.ehcache.Element;
+
 /**
  * <p>This class is a storage backend for cache entries that uses the
  * popular <a href="http://ehcache.org">Ehcache</a> cache implementation.

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/KeyHashingScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/KeyHashingScheme.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/KeyHashingScheme.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/KeyHashingScheme.java Tue Jan 12 20:43:36 2016
@@ -68,5 +68,5 @@ public interface KeyHashingScheme {
      *   as its key for looking up cache entries
      * @return a cache key suitable for use with memcached
      */
-    public String hash(String storageKey);
+    String hash(String storageKey);
 }

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/client/cache/TestHttpCacheEntry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/client/cache/TestHttpCacheEntry.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/client/cache/TestHttpCacheEntry.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/client/cache/TestHttpCacheEntry.java Tue Jan 12 20:43:36 2016
@@ -39,13 +39,13 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.http.Header;
-import org.apache.http.HttpStatus;
-import org.apache.http.HttpVersion;
-import org.apache.http.StatusLine;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.StatusLine;
+import org.apache.hc.core5.http.message.BasicHeader;
+import org.apache.hc.core5.http.message.BasicStatusLine;
 import org.apache.http.client.utils.DateUtils;
-import org.apache.http.message.BasicHeader;
-import org.apache.http.message.BasicStatusLine;
 import org.junit.Before;
 import org.junit.Test;
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/AbstractProtocolTest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/AbstractProtocolTest.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/AbstractProtocolTest.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/AbstractProtocolTest.java Tue Jan 12 20:43:36 2016
@@ -28,11 +28,12 @@ package org.apache.http.impl.client.cach
 
 import java.util.HashMap;
 
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpVersion;
+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.HttpResponse;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.message.BasicHttpRequest;
 import org.apache.http.client.cache.HttpCacheContext;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpExecutionAware;
@@ -40,9 +41,8 @@ import org.apache.http.client.methods.Ht
 import org.apache.http.client.protocol.HttpClientContext;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.impl.execchain.ClientExecChain;
-import org.apache.http.message.BasicHttpRequest;
-import org.easymock.IExpectationSetters;
 import org.easymock.EasyMock;
+import org.easymock.IExpectationSetters;
 import org.junit.Before;
 
 public abstract class AbstractProtocolTest {
@@ -85,7 +85,7 @@ public abstract class AbstractProtocolTe
 
         body = HttpTestUtils.makeBody(entityLength);
 
-        request = HttpRequestWrapper.wrap(new BasicHttpRequest("GET", "/foo", HttpVersion.HTTP_1_1));
+        request = HttpRequestWrapper.wrap(new BasicHttpRequest("GET", "/foo", HttpVersion.HTTP_1_1), host);
 
         context = HttpCacheContext.create();
         context.setTargetHost(host);

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/DummyBackend.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/DummyBackend.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/DummyBackend.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/DummyBackend.java Tue Jan 12 20:43:36 2016
@@ -28,18 +28,18 @@ package org.apache.http.impl.client.cach
 
 import java.io.IOException;
 
-import org.apache.http.HttpException;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.ProtocolVersion;
+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.HttpStatus;
+import org.apache.hc.core5.http.ProtocolVersion;
+import org.apache.hc.core5.http.message.BasicHttpResponse;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpExecutionAware;
 import org.apache.http.client.methods.HttpRequestWrapper;
 import org.apache.http.client.protocol.HttpClientContext;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.impl.execchain.ClientExecChain;
-import org.apache.http.message.BasicHttpResponse;
 
 public class DummyBackend implements ClientExecChain {
 

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java?rev=1724315&r1=1724314&r2=1724315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/test/java/org/apache/http/impl/client/cache/HttpTestUtils.java Tue Jan 12 20:43:36 2016
@@ -32,24 +32,24 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Random;
 
-import org.apache.http.Header;
-import org.apache.http.HeaderElement;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpMessage;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.HttpVersion;
-import org.apache.http.RequestLine;
-import org.apache.http.StatusLine;
+import org.apache.hc.core5.http.Header;
+import org.apache.hc.core5.http.HeaderElement;
+import org.apache.hc.core5.http.HttpEntity;
+import org.apache.hc.core5.http.HttpMessage;
+import org.apache.hc.core5.http.HttpRequest;
+import org.apache.hc.core5.http.HttpResponse;
+import org.apache.hc.core5.http.HttpStatus;
+import org.apache.hc.core5.http.HttpVersion;
+import org.apache.hc.core5.http.RequestLine;
+import org.apache.hc.core5.http.StatusLine;
+import org.apache.hc.core5.http.entity.ByteArrayEntity;
+import org.apache.hc.core5.http.message.BasicHeader;
+import org.apache.hc.core5.http.message.BasicHttpRequest;
+import org.apache.hc.core5.http.message.BasicHttpResponse;
+import org.apache.hc.core5.http.message.BasicStatusLine;
 import org.apache.http.client.cache.HeaderConstants;
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.utils.DateUtils;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.message.BasicHeader;
-import org.apache.http.message.BasicHttpRequest;
-import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.message.BasicStatusLine;
 import org.junit.Assert;
 
 public class HttpTestUtils {




Mime
View raw message