From dfe45e8f56b9ef2e11baff537829ad7c22c6d005 Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Fri, 15 Oct 2010 14:35:28 +0000 Subject: [PATCH] HTTPCLIENT-1009: [follow-up] chunked value for CombinedEntity Contributed by Joe Campbell git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1022947 13f79535-47bb-0310-9956-ffa450edef68 --- .../http/impl/client/cache/SizeLimitedResponseReader.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java index c4b5ed882..c863eaf42 100644 --- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java +++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/SizeLimitedResponseReader.java @@ -117,11 +117,13 @@ class SizeLimitedResponseReader { ensureConsumed(); HttpResponse reconstructed = new BasicHttpResponse(response.getStatusLine()); reconstructed.setHeaders(response.getAllHeaders()); + CombinedEntity combinedEntity = new CombinedEntity(resource, instream); HttpEntity entity = response.getEntity(); if (entity != null) { combinedEntity.setContentType(entity.getContentType()); combinedEntity.setContentEncoding(entity.getContentEncoding()); + combinedEntity.setChunked(entity.isChunked()); } reconstructed.setEntity(combinedEntity); return reconstructed;