jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1577962 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
Date Sun, 16 Mar 2014 01:39:42 GMT
Author: sebb
Date: Sun Mar 16 01:39:41 2014
New Revision: 1577962

URL: http://svn.apache.org/r1577962
Log:
Try to process more redirect strings

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java?rev=1577962&r1=1577961&r2=1577962&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
Sun Mar 16 01:39:41 2014
@@ -109,9 +109,16 @@ public class HttpMirrorThread implements
             final String requestPath = requestParts[1];
             final HashMap<String, String> parameters = new HashMap<String, String>();
             if (HTTPConstants.GET.equals(requestMethod)) {
-                try {
-                    URI uri = new URI(requestPath);
-                    String query = uri.getQuery();
+                int querypos = requestPath.indexOf('?');
+                if (querypos >= 0) {
+                    String query;
+                    try {
+                        URI uri = new URI(requestPath); // Use URI because it will decode
the query
+                        query = uri.getQuery();
+                    } catch (URISyntaxException e) {
+                        log.warn(e.getMessage());
+                        query=requestPath.substring(querypos+1);
+                    }
                     if (query != null) {
                         String params[] = query.split("&");
                         for(String param : params) {
@@ -121,8 +128,6 @@ public class HttpMirrorThread implements
                             }
                         }
                     }
-                } catch (URISyntaxException e) {
-                    log.warn("error parsing "+requestPath, e);
                 }
             }
 



Mime
View raw message