sebb 2004/07/05 16:29:39
Modified: src/protocol/http/org/apache/jmeter/protocol/http/sampler
HTTPSampler2.java
Log:
Make http version a JMeter property (and change name); add timeout
Revision Changes Path
1.13 +5 -2
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.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- HTTPSampler2.java 3 Jul 2004 03:13:44 -0000 1.12
+++ HTTPSampler2.java 5 Jul 2004 23:29:39 -0000 1.13
@@ -43,6 +43,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;
@@ -225,9 +226,11 @@
}
- // 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()) {
httpMethod = new ConnectMethod(httpMethod);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]