jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1831527 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Date Sun, 13 May 2018 21:20:03 GMT
Author: pmouawad
Date: Sun May 13 21:20:03 2018
New Revision: 1831527

URL: http://svn.apache.org/viewvc?rev=1831527&view=rev
Log:
Bug 62321 - Computing of response size is incorrect in nightly build
Bugzilla Id: 62321

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1831527&r1=1831526&r2=1831527&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Sun May 13 21:20:03 2018
@@ -400,7 +400,11 @@ public class HTTPHC4Impl extends HTTPHCA
                 final HttpContext context) throws HttpException, IOException {
             HttpResponse response = super.doReceiveResponse(request, conn, context);
             HttpConnectionMetrics metrics = conn.getMetrics();
-            context.setAttribute(CONTEXT_ATTRIBUTE_RECEIVED_BYTES, metrics.getReceivedBytesCount());

+            HttpEntity entity = response.getEntity();
+            context.setAttribute(CONTEXT_ATTRIBUTE_RECEIVED_BYTES, 
+                    metrics.getReceivedBytesCount()+
+                    (entity != null ? entity.getContentLength(): 0L));
+
             metrics.reset();
             return response;
         }



Mime
View raw message