Restore original logic - contentLen = 0 was outside null check
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1206736 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8f91869343
commit
12a3dbebeb
|
@ -182,8 +182,8 @@ public class TestHttpCore implements TestHttpAgent {
|
||||||
HttpEntity entity = response.getEntity();
|
HttpEntity entity = response.getEntity();
|
||||||
if (entity != null) { // TODO can this be null?
|
if (entity != null) { // TODO can this be null?
|
||||||
InputStream instream = entity.getContent();
|
InputStream instream = entity.getContent();
|
||||||
if (instream != null) {
|
|
||||||
contentLen = 0;
|
contentLen = 0;
|
||||||
|
if (instream != null) {
|
||||||
try {
|
try {
|
||||||
int l = 0;
|
int l = 0;
|
||||||
while ((l = instream.read(buffer)) != -1) {
|
while ((l = instream.read(buffer)) != -1) {
|
||||||
|
|
Loading…
Reference in New Issue