Author: markt
Date: Mon Sep 19 20:40:49 2016
New Revision: 1761501

URL: http://svn.apache.org/viewvc?rev=1761501&view=rev
Log:
Confirm ':' is not encoded in a redirect to http://localhost/

Modified:
    tomcat/trunk/test/org/apache/catalina/valves/rewrite/TestRewriteValve.java

Modified: 
tomcat/trunk/test/org/apache/catalina/valves/rewrite/TestRewriteValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/valves/rewrite/TestRewriteValve.java?rev=1761501&r1=1761500&r2=1761501&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/valves/rewrite/TestRewriteValve.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/valves/rewrite/TestRewriteValve.java 
Mon Sep 19 20:40:49 2016
@@ -465,6 +465,15 @@ public class TestRewriteValve extends To
     }
 
 
+    @Test
+    public void testHostRewrite() throws Exception {
+        // Based on report from users list that ':' was encoded and breaking
+        // the redirect
+        doTestRewrite("RewriteRule ^/b(.*) 
http://%{HTTP_HOST}:%{SERVER_PORT}/a$1 [R]",
+                "/b/%255A", "/a/%255A");
+    }
+
+
     private void doTestRewrite(String config, String request, String 
expectedURI) throws Exception {
         doTestRewrite(config, request, expectedURI, null);
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to