jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1468570 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Date Tue, 16 Apr 2013 19:21:51 GMT
Author: sebb
Date: Tue Apr 16 19:21:51 2013
New Revision: 1468570

URL: http://svn.apache.org/r1468570
Log:
Can now drop work-round for obtaining default HTTP params

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=1468570&r1=1468569&r2=1468570&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
Tue Apr 16 19:21:51 2013
@@ -89,6 +89,7 @@ import org.apache.http.params.CoreConnec
 import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.params.DefaultedHttpParams;
 import org.apache.http.params.HttpParams;
+import org.apache.http.params.SyncBasicHttpParams;
 import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HTTP;
@@ -167,10 +168,8 @@ public class HTTPHC4Impl extends HTTPHCA
     static {
         log.info("HTTP request retry count = "+RETRY_COUNT);
         
-        // TODO use new setDefaultHttpParams(HttpParams params) static method when 4.1 is
available
-        final DefaultHttpClient dhc = new DefaultHttpClient();
-        DEFAULT_HTTP_PARAMS = dhc.getParams(); // Get the default params
-        dhc.getConnectionManager().shutdown(); // Tidy up
+        DEFAULT_HTTP_PARAMS = new SyncBasicHttpParams(); // Could we drop the Sync here?
+        DefaultHttpClient.setDefaultHttpParams(DEFAULT_HTTP_PARAMS);
         
         // Process Apache HttpClient parameters file
         String file=JMeterUtils.getProperty("hc.parameters.file"); // $NON-NLS-1$



Mime
View raw message