sebb 2004/07/05 16:34:09
Modified: src/protocol/http/org/apache/jmeter/protocol/http/sampler
Tag: rel-2_0 HTTPSampler2.java
Log:
Make http version a JMeter property (and change name); add timeout
Revision Changes Path
No revision
No revision
1.8.2.8 +7 -5
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
Index: HTTPSampler2.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java,v
retrieving revision 1.8.2.7
retrieving revision 1.8.2.8
diff -u -r1.8.2.7 -r1.8.2.8
--- HTTPSampler2.java 3 Jul 2004 03:13:32 -0000 1.8.2.7
+++ HTTPSampler2.java 5 Jul 2004 23:34:09 -0000 1.8.2.8
@@ -45,6 +45,7 @@
import org.apache.jmeter.testelement.property.CollectionProperty;
import org.apache.jmeter.testelement.property.PropertyIterator;
+import org.apache.jmeter.util.JMeterUtils;
import org.apache.jorphan.logging.LoggingManager;
@@ -227,10 +228,11 @@
//httpMethod;
new DefaultMethodRetryHandler();
}
-
- // TODO make this a JMeter property
-
httpMethod.setHttp11(!System.getProperty("http.version","1.1").equals("1.0"));
+
httpMethod.setHttp11(!JMeterUtils.getPropDefault("httpclient.version","1.1").equals("1.0"));
+
+ // Set the timeout (if non-zero)
+ httpConn.setSoTimeout(JMeterUtils.getPropDefault("httpclient.timeout",0));
httpState = new HttpState();
if (httpConn.isProxied() && httpConn.isSecure()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]