jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1848905 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Date Thu, 13 Dec 2018 22:25:33 GMT
Author: pmouawad
Date: Thu Dec 13 22:25:33 2018
New Revision: 1848905

URL: http://svn.apache.org/viewvc?rev=1848905&view=rev
Log:
log request headers before and after request

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=1848905&r1=1848904&r2=1848905&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
Thu Dec 13 22:25:33 2018
@@ -35,6 +35,7 @@ import java.security.GeneralSecurityExce
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -570,9 +571,16 @@ public class HTTPHC4Impl extends HTTPHCA
             // perform the sample
             httpResponse = 
                     executeRequest(httpClient, httpRequest, localContext, url);
-
+            if (log.isDebugEnabled()) {
+                log.debug("Headers in request before:{}", Arrays.asList(httpRequest.getAllHeaders()));
+            }
             // Needs to be done after execute to pick up all the headers
             final HttpRequest request = (HttpRequest) localContext.getAttribute(HttpCoreContext.HTTP_REQUEST);
+            if (log.isDebugEnabled()) {
+                log.debug("Headers in request after:{}, in localContext#request:{}", 
+                        Arrays.asList(httpRequest.getAllHeaders()),
+                        Arrays.asList(request.getAllHeaders()));
+            }
             extractClientContextAfterSample(jMeterVariables, localContext);
             // We've finished with the request, so we can add the LocalAddress to it for
display
             if (localAddress != null) {



Mime
View raw message