HTTPCLIENT-1009: [follow-up] chunked value for CombinedEntity
Contributed by Joe Campbell <joseph.r.campbell at gmail.com> git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1022947 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0f2cc20b22
commit
dfe45e8f56
|
@ -117,11 +117,13 @@ class SizeLimitedResponseReader {
|
||||||
ensureConsumed();
|
ensureConsumed();
|
||||||
HttpResponse reconstructed = new BasicHttpResponse(response.getStatusLine());
|
HttpResponse reconstructed = new BasicHttpResponse(response.getStatusLine());
|
||||||
reconstructed.setHeaders(response.getAllHeaders());
|
reconstructed.setHeaders(response.getAllHeaders());
|
||||||
|
|
||||||
CombinedEntity combinedEntity = new CombinedEntity(resource, instream);
|
CombinedEntity combinedEntity = new CombinedEntity(resource, instream);
|
||||||
HttpEntity entity = response.getEntity();
|
HttpEntity entity = response.getEntity();
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
combinedEntity.setContentType(entity.getContentType());
|
combinedEntity.setContentType(entity.getContentType());
|
||||||
combinedEntity.setContentEncoding(entity.getContentEncoding());
|
combinedEntity.setContentEncoding(entity.getContentEncoding());
|
||||||
|
combinedEntity.setChunked(entity.isChunked());
|
||||||
}
|
}
|
||||||
reconstructed.setEntity(combinedEntity);
|
reconstructed.setEntity(combinedEntity);
|
||||||
return reconstructed;
|
return reconstructed;
|
||||||
|
|
Loading…
Reference in New Issue