jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1511506 - /jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPUtils.java
Date Wed, 07 Aug 2013 21:32:41 GMT
Author: pmouawad
Date: Wed Aug  7 21:32:41 2013
New Revision: 1511506

URL: http://svn.apache.org/r1511506
Log:
Bug 54482 - HC fails to follow redirects with non-encoded chars
Add some tests
Bugzilla Id: 54482

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPUtils.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPUtils.java?rev=1511506&r1=1511505&r2=1511506&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPUtils.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/TestHTTPUtils.java Wed Aug
 7 21:32:41 2013
@@ -85,9 +85,14 @@ public class TestHTTPUtils extends TestC
     public void testsanitizeUrl() throws Exception {
         testSanitizeUrl("http://localhost/", "http://localhost/");
         testSanitizeUrl("http://localhost/a/b/c%7Cd", "http://localhost/a/b/c|d");
-        // TODO more tests needed
+        testSanitizeUrl("http://localhost:8080/%5B%5D", "http://localhost:8080/%5B%5D");
+        testSanitizeUrl("http://localhost:8080/?%5B%5D", "http://localhost:8080/?%5B%5D");
+        testSanitizeUrl("http://localhost:8080/?%25%5B%5D%21%40%24%25%5E*%28%29", "http://localhost:8080/?%25%5B%5D!@$%^*()#");
+        testSanitizeUrl("http://localhost:8080/%5B%5D?%5B%5D%21%40%24%25%5E*%28%29", "http://localhost:8080/%5B%5D?[]!@$%^*()#");
+
     }
     
+
     private void testSanitizeUrl(String expected, String input) throws Exception {
         final URL url = new URL(input);
         final URI uri = new URI(expected);



Mime
View raw message