Author: sebb
Date: Sat Feb  3 12:00:51 2007
New Revision: 503297

URL: http://svn.apache.org/viewvc?view=rev&rev=503297
Log:
Add call to SSLManager which sets up the same https handling as for the Java 
stack

Modified:
    
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java

Modified: 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java?view=diff&rev=503297&r1=503296&r2=503297
==============================================================================
--- 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
 (original)
+++ 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
 Sat Feb  3 12:00:51 2007
@@ -73,6 +73,7 @@
 import org.apache.jmeter.testelement.property.CollectionProperty;
 import org.apache.jmeter.testelement.property.PropertyIterator;
 import org.apache.jmeter.util.JMeterUtils;
+import org.apache.jmeter.util.SSLManager;
 import org.apache.jorphan.logging.LoggingManager;
 import org.apache.jorphan.util.JOrphanUtils;
 import org.apache.log.Logger;
@@ -263,8 +264,8 @@
         * 
         * @param u
         *            <code>URL</code> of the URL request
-        * @param method
-        *            http/https
+        * @param method 
+        *            GET/PUT/HEAD etc
         * @param res
         *            sample result to save request infos to
         * @return <code>HttpConnection</code> ready for .connect
@@ -281,6 +282,12 @@
                if ((schema == null) || (schema.length()==0)) {
                        schema = PROTOCOL_HTTP;
                }
+               
+               if (PROTOCOL_HTTPS.equalsIgnoreCase(schema)){
+                       SSLManager.getInstance(); // ensure the manager is 
initialised
+                       // we don't currently need to do anything further, as 
this sets the default https protocol
+               }
+               
                Protocol protocol = Protocol.getProtocol(schema);
 
                String host = uri.getHost();
@@ -541,7 +548,10 @@
             httpMethod = new OptionsMethod(urlStr);
         } else if (method.equals(DELETE)){
             httpMethod = new DeleteMethod(urlStr);
+        } else if (method.equals(GET)){
+            httpMethod = new GetMethod(urlStr);
         } else {
+               log.error("Unexpected method (converted to GET): "+method);
             httpMethod = new GetMethod(urlStr);
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to