Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gorovoy2010-05-21 20:28:32 -0400
committerMichael Gorovoy2010-05-21 20:28:32 -0400
commit4863e85754f1843debf831a4a283adfc153b4d04 (patch)
tree92279d2d5b19d99da1802e72f1c75f9a1460694f
parent2969e456a764425a1c252e126fd90089835ec679 (diff)
downloadorg.eclipse.jetty.project-4863e85754f1843debf831a4a283adfc153b4d04.tar.gz
org.eclipse.jetty.project-4863e85754f1843debf831a4a283adfc153b4d04.tar.xz
org.eclipse.jetty.project-4863e85754f1843debf831a4a283adfc153b4d04.zip
313278 Implement octet ranges in IPAccessHandler
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1838 7e9141cc-0065-0410-87d8-b60c137991c4
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/handler/IPAccessHandler.java2
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IPAccessHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IPAccessHandler.java
index f77efc65c4..746666aa1d 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IPAccessHandler.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/IPAccessHandler.java
@@ -283,7 +283,7 @@ public class IPAccessHandler extends HandlerWrapper
for (Object entry: whiteList)
{
PathMap pathMap = ((Map.Entry<String,PathMap>)entry).getValue();
- if (match = (pathMap!=null && (pathMap.size()==0 || pathMap.match(path)!=null)));
+ if (match = (pathMap!=null && (pathMap.size()==0 || pathMap.match(path)!=null)))
break;
}
}
diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java
index b168e3ecb0..0ff588c685 100644
--- a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java
+++ b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java
@@ -363,6 +363,10 @@ public class IPAccessHandlerTest
{"127.0.0.1|/dump/info;127.0.0.1|/dump/test", "127.0.0.1|/dump/test", "127.0.0.1", "/dump/test", "403"},
{"127.0.0.1|/dump/info;127.0.0.1|/dump/test", "127.0.0.1|/dump/test", "127.0.0.1", "/dump/fail", "403"},
+ {"127.0.0.1|/;127.0.0.0-2|/dump/*", "127.0.0.0,1|/dump/fail", "127.0.0.1", "/", "200"},
+ {"127.0.0.1|/;127.0.0.0-2|/dump/*", "127.0.0.0,1|/dump/fail", "127.0.0.1", "/dump/info", "200"},
+ {"127.0.0.1|/;127.0.0.0-2|/dump/*", "127.0.0.0,1|/dump/fail", "127.0.0.1", "/dump/fail", "403"},
+
// Different address
{"127.0.0.2", "", "127.0.0.1", "/", "403"},
{"127.0.0.2", "", "127.0.0.1", "/dump/info", "403"},

Back to the top