You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by se...@apache.org on 2011/11/27 16:29:33 UTC
svn commit: r1206736 -
/httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java
Author: sebb
Date: Sun Nov 27 15:29:32 2011
New Revision: 1206736
URL: http://svn.apache.org/viewvc?rev=1206736&view=rev
Log:
Restore original logic - contentLen = 0 was outside null check
Modified:
httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java
Modified: httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java?rev=1206736&r1=1206735&r2=1206736&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java (original)
+++ httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpCore.java Sun Nov 27 15:29:32 2011
@@ -182,8 +182,8 @@ public class TestHttpCore implements Tes
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) {