You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2018/05/13 21:20:03 UTC
svn commit: r1831527 -
/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
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;
}