View | Details | Raw Unified | Return to bug 51882
Collapse All | Expand All

(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java (+5 lines)
Lines 30-35 Link Here
30
import java.util.Map;
30
import java.util.Map;
31
import java.util.zip.GZIPInputStream;
31
import java.util.zip.GZIPInputStream;
32
32
33
import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;
33
import org.apache.commons.httpclient.Header;
34
import org.apache.commons.httpclient.Header;
34
import org.apache.commons.httpclient.HostConfiguration;
35
import org.apache.commons.httpclient.HostConfiguration;
35
import org.apache.commons.httpclient.HttpClient;
36
import org.apache.commons.httpclient.HttpClient;
Lines 87-92 Link Here
87
public class HTTPHC3Impl extends HTTPHCAbstractImpl {
88
public class HTTPHC3Impl extends HTTPHCAbstractImpl {
88
89
89
    private static final Logger log = LoggingManager.getLoggerForClass();
90
    private static final Logger log = LoggingManager.getLoggerForClass();
91
    /** retry count to be used; defaults to 0 = disable retries */
92
    private static final int RETRY_COUNT = JMeterUtils.getPropDefault("httpclient3.retrycount", 0);
90
93
91
    private static final String HTTP_AUTHENTICATION_PREEMPTIVE = "http.authentication.preemptive"; // $NON-NLS-1$
94
    private static final String HTTP_AUTHENTICATION_PREEMPTIVE = "http.authentication.preemptive"; // $NON-NLS-1$
92
95
Lines 439-444 Link Here
439
        if ( httpClient == null )
442
        if ( httpClient == null )
440
        {
443
        {
441
            httpClient = new HttpClient(new SimpleHttpConnectionManager());
444
            httpClient = new HttpClient(new SimpleHttpConnectionManager());
445
            httpClient.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, 
446
                    new DefaultHttpMethodRetryHandler(RETRY_COUNT, false));
442
            if (log.isDebugEnabled()) {
447
            if (log.isDebugEnabled()) {
443
                log.debug("Created new HttpClient: @"+System.identityHashCode(httpClient));
448
                log.debug("Created new HttpClient: @"+System.identityHashCode(httpClient));
444
            }
449
            }
(-)bin/jmeter.properties (+3 lines)
Lines 330-335 Link Here
330
# Number of retries to attempt (default 0)
330
# Number of retries to attempt (default 0)
331
#httpclient4.retrycount=0
331
#httpclient4.retrycount=0
332
332
333
# Number of retries to attempt (default 0)
334
#httpclient3.retrycount=0
335
333
#---------------------------------------------------------------------------
336
#---------------------------------------------------------------------------
334
# Results file configuration
337
# Results file configuration
335
#---------------------------------------------------------------------------
338
#---------------------------------------------------------------------------

Return to bug 51882