Author: pmouawad
Date: Wed Feb 17 22:41:37 2016
New Revision: 1730962

URL: http://svn.apache.org/viewvc?rev=1730962&view=rev
Log:
Bug 57577 - HttpSampler : Retrieve All Embedded Resources should only compute 
size or hash by default
#resolve #127
Bugzilla Id: 57577

Modified:
    jmeter/trunk/bin/jmeter.properties
    
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/bin/jmeter.properties
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.properties?rev=1730962&r1=1730961&r2=1730962&view=diff
==============================================================================
--- jmeter/trunk/bin/jmeter.properties (original)
+++ jmeter/trunk/bin/jmeter.properties Wed Feb 17 22:41:37 2016
@@ -996,6 +996,10 @@ beanshell.server.file=../extras/startup.
 # Parent sample will not be marked as failed 
 #httpsampler.ignore_failed_embedded_resources=false
 
+# ignore the embedded resources response data : just keep the size and the md5
+# default to false
+#httpsampler.ignore_embedded_resources_data=true
+
 # The encoding to be used if none is provided (default ISO-8859-1)
 #sampleresult.default.encoding=ISO-8859-1
 

Modified: 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=1730962&r1=1730961&r2=1730962&view=diff
==============================================================================
--- 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
 (original)
+++ 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
 Wed Feb 17 22:41:37 2016
@@ -198,6 +198,9 @@ public abstract class HTTPSamplerBase ex
 
     public static final int CONCURRENT_POOL_SIZE = 4; // Default concurrent 
pool size for download embedded resources
 
+    private static final boolean IGNORE_EMBEDDED_RESOURCES_DATA = 
+            
JMeterUtils.getPropDefault("httpsampler.ignore_embedded_resources_data", 
false); // $NON-NLS-1$ // default value: false
+
     public static enum SourceType {
         HOSTNAME("web_testing_source_ip_hostname"), //$NON-NLS-1$
         DEVICE("web_testing_source_ip_device"), //$NON-NLS-1$
@@ -1954,6 +1957,7 @@ public abstract class HTTPSamplerBase ex
                 CookieManager clonedCookieManager = (CookieManager) 
cookieManager.clone();
                 this.sampler.setCookieManagerProperty(clonedCookieManager);
             } 
+            this.sampler.setMD5(this.sampler.useMD5() || 
IGNORE_EMBEDDED_RESOURCES_DATA);
             this.jmeterContextOfParentThread = 
JMeterContextService.getContext();
         }
 
@@ -1972,7 +1976,7 @@ public abstract class HTTPSamplerBase ex
     }
     
     /**
-     * Custom thread implementation that 
+     * Custom thread implementation that allows notification of threadEnd
      *
      */
     private static class CleanerThread extends Thread {

Modified: jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1730962&r1=1730961&r2=1730962&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Wed Feb 17 22:41:37 2016
@@ -110,6 +110,7 @@ Summary
     <li><bug>59005</bug>HTTP Sampler : Added WebDAV verb (SEARCH).</li>
     <li><bug>59006</bug>Change Default proxy recording port to 8888 to align 
it with Recording Template. Contributed by Antonio Gomes Rodrigues (ra0077 at 
gmail.com)</li>
     <li><bug>58099</bug>Performance : Lazily initialize HttpClient SSL Context 
to avoid its initialization even for HTTP only scenarios</li>
+    <li><bug>57577</bug>HttpSampler : Retrieve All Embedded Resources should 
only compute size or hash by default. Contributed by Benoit Wiart (benoit dot 
wiart at gmail.com)</li>
 </ul>
 
 <h3>Other samplers</h3>


Reply via email to