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 2017/03/09 20:34:05 UTC

svn commit: r1786236 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java

Author: pmouawad
Date: Thu Mar  9 20:34:05 2017
New Revision: 1786236

URL: http://svn.apache.org/viewvc?rev=1786236&view=rev
Log:
add httpclient4.request_sent_retry_enabled to allow retrying even if request was sent

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=1786236&r1=1786235&r2=1786236&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 Mar  9 20:34:05 2017
@@ -152,6 +152,10 @@ public class HTTPHC4Impl extends HTTPHCA
 
     /** retry count to be used (default 0); 0 = disable retries */
     private static final int RETRY_COUNT = JMeterUtils.getPropDefault("httpclient4.retrycount", 0);
+    
+    /** true if it's OK to retry requests that have been sent */
+    private static final boolean REQUEST_SENT_RETRY_ENABLED = 
+            JMeterUtils.getPropDefault("httpclient4.request_sent_retry_enabled", false);
 
     /** Idle timeout to be applied to connections if no Keep-Alive header is sent by the server (default 0 = disable) */
     private static final int IDLE_TIMEOUT = JMeterUtils.getPropDefault("httpclient4.idletimeout", 0);
@@ -823,7 +827,8 @@ public class HTTPHC4Impl extends HTTPHCA
             httpClient = new DefaultHttpClient(connManager, clientParams) {
                 @Override
                 protected HttpRequestRetryHandler createHttpRequestRetryHandler() {
-                    return new StandardHttpRequestRetryHandler(RETRY_COUNT, false);
+                    return new StandardHttpRequestRetryHandler(RETRY_COUNT, 
+                            REQUEST_SENT_RETRY_ENABLED);
                 }
             };