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:
Sebastian Bazley 2011-11-27 15:29:32 +00:00
parent 8f91869343
commit 12a3dbebeb
1 changed files with 1 additions and 1 deletions

View File

@ -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();
contentLen = 0;
if (instream != null) { if (instream != null) {
contentLen = 0;
try { try {
int l = 0; int l = 0;
while ((l = instream.read(buffer)) != -1) { while ((l = instream.read(buffer)) != -1) {