From 12a3dbebeba22fdcdae286959ba5baad1ce98f34 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Sun, 27 Nov 2011 15:29:32 +0000 Subject: [PATCH] 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 --- .../java/org/apache/http/client/benchmark/TestHttpCore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java b/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java index 4d07b0050..2c1a75eee 100644 --- a/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java +++ b/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java @@ -182,8 +182,8 @@ public class TestHttpCore implements TestHttpAgent { HttpEntity entity = response.getEntity(); if (entity != null) { // TODO can this be null? InputStream instream = entity.getContent(); + contentLen = 0; if (instream != null) { - contentLen = 0; try { int l = 0; while ((l = instream.read(buffer)) != -1) {