jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1511538 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
Date Wed, 07 Aug 2013 23:39:02 GMT
Author: sebb
Date: Wed Aug  7 23:39:02 2013
New Revision: 1511538

URL: http://svn.apache.org/r1511538
Log:
Add code docn

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

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java?rev=1511538&r1=1511537&r2=1511538&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java
Wed Aug  7 23:39:02 2013
@@ -168,7 +168,15 @@ public class HttpRequestHdr {
         if (getMethod().startsWith(HTTPConstants.CONNECT)) {
             paramHttps = url;
         }
-        if (url.startsWith("/")) {
+        /* The next line looks odd, but proxied HTTP requests look like:
+         * GET http://www.apache.org/foundation/ HTTP/1.1
+         * i.e. url starts with "http:", not "/"
+         * whereas HTTPS proxy requests look like:
+         * CONNECT www.google.co.uk:443 HTTP/1.1
+         * followed by
+         * GET /?gws_rd=cr HTTP/1.1
+         */
+        if (url.startsWith("/")) { // it must be a proxied HTTPS request
             url = HTTPS + "://" + paramHttps + url; // $NON-NLS-1$
         }
         // JAVA Impl accepts URLs with unsafe characters so don't do anything



Mime
View raw message