jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1444983 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
Date Mon, 11 Feb 2013 22:30:07 GMT
Author: pmouawad
Date: Mon Feb 11 22:30:06 2013
New Revision: 1444983

URL: http://svn.apache.org/r1444983
Log:
Add URL concerned by certificate refusal if available

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java?rev=1444983&r1=1444982&r2=1444983&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java Mon Feb
11 22:30:06 2013
@@ -175,6 +175,7 @@ public class Proxy extends Thread {
         SampleResult result = null;
         HeaderManager headers = null;
         HTTPSamplerBase sampler = null;
+        String[] param = null;
         try {
             // Now, parse only first line
             request.parse(new BufferedInputStream(clientSocket.getInputStream()));
@@ -186,7 +187,7 @@ public class Proxy extends Thread {
                 outStreamClient.write(("HTTP/1.0 200 OK\r\n\r\n").getBytes(SampleResult.DEFAULT_HTTP_ENCODING));
// $NON-NLS-1$
                 outStreamClient.flush();
                // With ssl request, url is host:port (without https:// or path)
-                String[] param = request.getUrl().split(":");  // $NON-NLS-1$
+                param = request.getUrl().split(":");  // $NON-NLS-1$
                 if (param.length == 2) {
                     log.debug("Start to negotiate SSL connection, host: " + param[0]);
                     clientSocket = startSSL(clientSocket, param[0]);
@@ -228,7 +229,8 @@ public class Proxy extends Thread {
                     "<a href=\"http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Proxy_Server\">HTTP
Proxy Server documentation</a>"));
             result = generateErrorResult(result, e); // Generate result (if nec.) and populate
it
         } catch (IOException ioe) {
-            log.error("Problem with SSL certificate? Ensure browser is set to accept the
JMeter proxy cert: "+ioe.getLocalizedMessage(), ioe);
+            log.error("Problem with SSL certificate? Ensure browser is set to accept the
JMeter proxy cert: "+ioe.getLocalizedMessage()+" for url:" +
+                    (param != null && param.length>0 ?  param[0] : ""), ioe);
             // won't work: writeErrorToClient(HttpReplyHdr.formInternalError());
             if (result == null) {
                 result = new SampleResult();



Mime
View raw message