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
This commit is contained in:
Michael Gorovoy 2010-05-22 00:28:32 +00:00
parent 2969e456a7
commit 4863e85754
2 changed files with 5 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -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"},