You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2009/03/13 01:47:34 UTC

svn commit: r753075 - in /jakarta/jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java xdocs/changes.xml

Author: sebb
Date: Fri Mar 13 00:47:34 2009
New Revision: 753075

URL: http://svn.apache.org/viewvc?rev=753075&view=rev
Log:
Change HTTPS spoofing so https: links are replaced even when URL match fails

Modified:
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
    jakarta/jmeter/trunk/xdocs/changes.xml

Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java?rev=753075&r1=753074&r2=753075&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java (original)
+++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java Fri Mar 13 00:47:34 2009
@@ -178,17 +178,14 @@
             /*
              * If we are trying to spoof https, change the protocol
              */
-            boolean forcedHTTP = false; // so we know when to revert
             if (httpsSpoof) {
                 if (httpsSpoofMatch.length() > 0){
                     String url = request.getUrl();
                     if (url.matches(httpsSpoofMatch)){
                         sampler.setProtocol(HTTPConstants.PROTOCOL_HTTPS);
-                        forcedHTTP = true;
                     }
                 } else {
                     sampler.setProtocol(HTTPConstants.PROTOCOL_HTTPS);
-                    forcedHTTP = true;
                 }
             }
             sampler.threadStarted(); // Needed for HTTPSampler2
@@ -199,7 +196,7 @@
              * replace all occurences of "https://" with "http://" for the client.
              * TODO - also check the match string to restrict the changes further?
              */
-            if (forcedHTTP && SampleResult.TEXT.equals(result.getDataType()))
+            if (httpsSpoof && SampleResult.TEXT.equals(result.getDataType()))
             {
                 final String enc = result.getDataEncodingWithDefault();
                 String noHttpsResult = new String(result.getResponseData(),enc);

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=753075&r1=753074&r2=753075&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Fri Mar 13 00:47:34 2009
@@ -189,6 +189,7 @@
 <li>The JMeter variable "sample_variables" is sent to all server instances to ensure the data is available to the client.</li>
 <li>Bug 46821 - JDBC select request doesn't store the first column in the variables</li>
 <li>Fix bug in HTTP file: handling - read bytes, not characters in the default encoding.</li>
+<li>Change HTTPS spoofing so https: links are replaced even when URL match fails</li>
 </ul>
 
 <h3>Improvements</h3>



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org