jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1220430 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java xdocs/changes.xml
Date Sun, 18 Dec 2011 15:34:34 GMT
Author: pmouawad
Date: Sun Dec 18 15:34:34 2011
New Revision: 1220430

URL: http://svn.apache.org/viewvc?rev=1220430&view=rev
Log:
Bug 52352 - Proxy : Support IPv6 URLs capture

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

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=1220430&r1=1220429&r2=1220430&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
Sun Dec 18 15:34:34 2011
@@ -484,10 +484,14 @@ public class HttpRequestHdr {
             str = str.substring(0, i);
         }
         // chop to server.name
-        i = str.indexOf(":"); // $NON-NLS-1$
+        i = str.lastIndexOf(":"); // $NON-NLS-1$
         if (0 < i) {
             str = str.substring(0, i);
         }
+        // Handle IPv6 urls
+        if(str.startsWith("[")&& str.endsWith("]")) {
+        	return str.substring(1, str.length()-1);
+        }
         return str;
     }
 
@@ -510,8 +514,8 @@ public class HttpRequestHdr {
         if (0 < i) {
             str = str.substring(0, i);
         }
-        // chop XX
-        i = str.indexOf(":");
+        // chop to server.name
+        i = str.lastIndexOf(":");
         if (0 < i) {
             return Integer.parseInt(str.substring(i + 1).trim());
         }

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1220430&r1=1220429&r2=1220430&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sun Dec 18 15:34:34 2011
@@ -163,6 +163,7 @@ This behaviour can be changed with prope
 <ul>
 <li>Bug 51981 - Better support for file: protocol in HTTP sampler</li>
 <li>Bug 52033 - Allowing multiple certificates (JKS)</li>
+<li>Bug 52352 - Proxy : Support IPv6 URLs capture</li>
 </ul>
 
 <h3>Other samplers</h3>



Mime
View raw message