tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1056340 - in /tomcat/trunk/test/org/apache/catalina: filters/TestRemoteIpFilter.java valves/TestRemoteIpValve.java
Date Fri, 07 Jan 2011 14:56:51 GMT
Author: markt
Date: Fri Jan  7 14:56:50 2011
New Revision: 1056340

URL: http://svn.apache.org/viewvc?rev=1056340&view=rev
Log:
Fix tests after regex changes

Modified:
    tomcat/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java
    tomcat/trunk/test/org/apache/catalina/valves/TestRemoteIpValve.java

Modified: tomcat/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java?rev=1056340&r1=1056339&r2=1056340&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java (original)
+++ tomcat/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java Fri Jan  7 14:56:50
2011
@@ -246,7 +246,7 @@ public class TestRemoteIpFilter extends 
 
         // PREPARE
         FilterDef filterDef = new FilterDef();
-        filterDef.addInitParameter("internalProxies", "192\\.168\\.0\\.10, 192\\.168\\.0\\.11");
+        filterDef.addInitParameter("internalProxies", "192\\.168\\.0\\.10|192\\.168\\.0\\.11");
         filterDef.addInitParameter("trustedProxies", "proxy1, proxy2, proxy3");
         filterDef.addInitParameter("remoteIpHeader", "x-forwarded-for");
         filterDef.addInitParameter("proxiesHeader", "x-forwarded-by");
@@ -278,8 +278,8 @@ public class TestRemoteIpFilter extends 
         // PREPARE
         RemoteIpFilter remoteIpFilter = new RemoteIpFilter();
         FilterDef filterDef = new FilterDef();
-        filterDef.addInitParameter("internalProxies", "192\\.168\\.0\\.10, 192\\.168\\.0\\.11");
-        filterDef.addInitParameter("trustedProxies", "proxy1, proxy2, proxy3");
+        filterDef.addInitParameter("internalProxies", "192\\.168\\.0\\.10|192\\.168\\.0\\.11");
+        filterDef.addInitParameter("trustedProxies", "proxy1|proxy2|proxy3");
         filterDef.addInitParameter("remoteIpHeader", "x-forwarded-for");
         filterDef.addInitParameter("proxiesHeader", "x-forwarded-by");
 
@@ -311,8 +311,8 @@ public class TestRemoteIpFilter extends 
 
         // PREPARE
         FilterDef filterDef = new FilterDef();
-        filterDef.addInitParameter("internalProxies", "127\\.0\\.0\\.1, 192\\.168\\..*, another-internal-proxy");
-        filterDef.addInitParameter("trustedProxies", "proxy1, proxy2, proxy3");
+        filterDef.addInitParameter("internalProxies", "127\\.0\\.0\\.1|192\\.168\\..*|another-internal-proxy");
+        filterDef.addInitParameter("trustedProxies", "proxy1|proxy2|proxy3");
         filterDef.addInitParameter("remoteIpHeader", "x-forwarded-for");
         filterDef.addInitParameter("proxiesHeader", "x-forwarded-by");
 
@@ -344,8 +344,8 @@ public class TestRemoteIpFilter extends 
 
         // PREPARE
         FilterDef filterDef = new FilterDef();
-        filterDef.addInitParameter("internalProxies", "192\\.168\\.0\\.10, 192\\.168\\.0\\.11");
-        filterDef.addInitParameter("trustedProxies", "proxy1, proxy2, proxy3");
+        filterDef.addInitParameter("internalProxies", "192\\.168\\.0\\.10|192\\.168\\.0\\.11");
+        filterDef.addInitParameter("trustedProxies", "proxy1|proxy2|proxy3");
         filterDef.addInitParameter("remoteIpHeader", "x-forwarded-for");
         filterDef.addInitParameter("proxiesHeader", "x-forwarded-by");
 
@@ -406,8 +406,8 @@ public class TestRemoteIpFilter extends 
     public void testInvokeUntrustedProxyInTheChain() throws Exception {
         // PREPARE
         FilterDef filterDef = new FilterDef();
-        filterDef.addInitParameter("internalProxies", "192\\.168\\.0\\.10, 192\\.168\\.0\\.11");
-        filterDef.addInitParameter("trustedProxies", "proxy1, proxy2, proxy3");
+        filterDef.addInitParameter("internalProxies", "192\\.168\\.0\\.10|192\\.168\\.0\\.11");
+        filterDef.addInitParameter("trustedProxies", "proxy1|proxy2|proxy3");
         filterDef.addInitParameter("remoteIpHeader", "x-forwarded-for");
         filterDef.addInitParameter("proxiesHeader", "x-forwarded-by");
 

Modified: tomcat/trunk/test/org/apache/catalina/valves/TestRemoteIpValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/valves/TestRemoteIpValve.java?rev=1056340&r1=1056339&r2=1056340&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/valves/TestRemoteIpValve.java (original)
+++ tomcat/trunk/test/org/apache/catalina/valves/TestRemoteIpValve.java Fri Jan  7 14:56:50
2011
@@ -131,8 +131,8 @@ public class TestRemoteIpValve extends T
         
         // PREPARE
         RemoteIpValve remoteIpValve = new RemoteIpValve();
-        remoteIpValve.setInternalProxies("192\\.168\\.0\\.10, 192\\.168\\.0\\.11");
-        remoteIpValve.setTrustedProxies("proxy1, proxy2, proxy3");
+        remoteIpValve.setInternalProxies("192\\.168\\.0\\.10|192\\.168\\.0\\.11");
+        remoteIpValve.setTrustedProxies("proxy1|proxy2|proxy3");
         remoteIpValve.setRemoteIpHeader("x-forwarded-for");
         remoteIpValve.setProxiesHeader("x-forwarded-by");
         RemoteAddrAndHostTrackerValve remoteAddrAndHostTrackerValve = new RemoteAddrAndHostTrackerValve();
@@ -171,8 +171,8 @@ public class TestRemoteIpValve extends T
         
         // PREPARE
         RemoteIpValve remoteIpValve = new RemoteIpValve();
-        remoteIpValve.setInternalProxies("192\\.168\\.0\\.10, 192\\.168\\.0\\.11");
-        remoteIpValve.setTrustedProxies("proxy1, proxy2, proxy3");
+        remoteIpValve.setInternalProxies("192\\.168\\.0\\.10|192\\.168\\.0\\.11");
+        remoteIpValve.setTrustedProxies("proxy1|proxy2|proxy3");
         remoteIpValve.setRemoteIpHeader("x-forwarded-for");
         remoteIpValve.setProxiesHeader("x-forwarded-by");
         RemoteAddrAndHostTrackerValve remoteAddrAndHostTrackerValve = new RemoteAddrAndHostTrackerValve();
@@ -212,8 +212,8 @@ public class TestRemoteIpValve extends T
         
         // PREPARE
         RemoteIpValve remoteIpValve = new RemoteIpValve();
-        remoteIpValve.setInternalProxies("192\\.168\\.0\\.10, 192\\.168\\.0\\.11");
-        remoteIpValve.setTrustedProxies("proxy1, proxy2, proxy3");
+        remoteIpValve.setInternalProxies("192\\.168\\.0\\.10|192\\.168\\.0\\.11");
+        remoteIpValve.setTrustedProxies("proxy1|proxy2|proxy3");
         remoteIpValve.setRemoteIpHeader("x-forwarded-for");
         remoteIpValve.setProxiesHeader("x-forwarded-by");
         RemoteAddrAndHostTrackerValve remoteAddrAndHostTrackerValve = new RemoteAddrAndHostTrackerValve();
@@ -252,8 +252,8 @@ public class TestRemoteIpValve extends T
         
         // PREPARE
         RemoteIpValve remoteIpValve = new RemoteIpValve();
-        remoteIpValve.setInternalProxies("127\\.0\\.0\\.1, 192\\.168\\..*, another-internal-proxy");
-        remoteIpValve.setTrustedProxies("proxy1, proxy2, proxy3");
+        remoteIpValve.setInternalProxies("127\\.0\\.0\\.1|192\\.168\\..*|another-internal-proxy");
+        remoteIpValve.setTrustedProxies("proxy1|proxy2|proxy3");
         remoteIpValve.setRemoteIpHeader("x-forwarded-for");
         remoteIpValve.setProxiesHeader("x-forwarded-by");
         RemoteAddrAndHostTrackerValve remoteAddrAndHostTrackerValve = new RemoteAddrAndHostTrackerValve();
@@ -549,8 +549,8 @@ public class TestRemoteIpValve extends T
     public void testInvokeNotAllowedRemoteAddr() throws Exception {
         // PREPARE
         RemoteIpValve remoteIpValve = new RemoteIpValve();
-        remoteIpValve.setInternalProxies("192\\.168\\.0\\.10, 192\\.168\\.0\\.11");
-        remoteIpValve.setTrustedProxies("proxy1,proxy2,proxy3");
+        remoteIpValve.setInternalProxies("192\\.168\\.0\\.10|192\\.168\\.0\\.11");
+        remoteIpValve.setTrustedProxies("proxy1|proxy2|proxy3");
         remoteIpValve.setRemoteIpHeader("x-forwarded-for");
         remoteIpValve.setProxiesHeader("x-forwarded-by");
         RemoteAddrAndHostTrackerValve remoteAddrAndHostTrackerValve = new RemoteAddrAndHostTrackerValve();
@@ -588,8 +588,8 @@ public class TestRemoteIpValve extends T
     public void testInvokeUntrustedProxyInTheChain() throws Exception {
         // PREPARE
         RemoteIpValve remoteIpValve = new RemoteIpValve();
-        remoteIpValve.setInternalProxies("192\\.168\\.0\\.10, 192\\.168\\.0\\.11");
-        remoteIpValve.setTrustedProxies("proxy1, proxy2, proxy3");
+        remoteIpValve.setInternalProxies("192\\.168\\.0\\.10|192\\.168\\.0\\.11");
+        remoteIpValve.setTrustedProxies("proxy1|proxy2|proxy3");
         remoteIpValve.setRemoteIpHeader("x-forwarded-for");
         remoteIpValve.setProxiesHeader("x-forwarded-by");
         RemoteAddrAndHostTrackerValve remoteAddrAndHostTrackerValve = new RemoteAddrAndHostTrackerValve();



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


Mime
View raw message