aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2013-09-08 22:42:56 -0400
committerJan Bartel2013-09-08 22:42:56 -0400
commitcdd95bb5515f35af090bcbcf6f9af03d5c6762c9 (patch)
tree12b9c61a6e0bb959ecab68e764e24969dd41ea28
parent1f765bf9ae124eb10562b9de85d3dc5dfdc916f1 (diff)
parent11085742c888677ef6411e4e4e79e4b75d6876f8 (diff)
downloadorg.eclipse.jetty.project-cdd95bb5515f35af090bcbcf6f9af03d5c6762c9.tar.gz
org.eclipse.jetty.project-cdd95bb5515f35af090bcbcf6f9af03d5c6762c9.tar.xz
org.eclipse.jetty.project-cdd95bb5515f35af090bcbcf6f9af03d5c6762c9.zip
Merge remote-tracking branch 'origin/jetty-8'
-rw-r--r--jetty-http/src/main/java/org/eclipse/jetty/http/PathMap.java3
-rw-r--r--jetty-http/src/test/java/org/eclipse/jetty/http/PathMapTest.java2
2 files changed, 5 insertions, 0 deletions
diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/PathMap.java b/jetty-http/src/main/java/org/eclipse/jetty/http/PathMap.java
index 0385c8ed66..d4e5119a3d 100644
--- a/jetty-http/src/main/java/org/eclipse/jetty/http/PathMap.java
+++ b/jetty-http/src/main/java/org/eclipse/jetty/http/PathMap.java
@@ -401,6 +401,9 @@ public class PathMap<O> extends HashMap<String,O>
public static boolean match(String pathSpec, String path, boolean noDefault)
throws IllegalArgumentException
{
+ if (pathSpec.length()==0)
+ return "/".equals(path);
+
char c = pathSpec.charAt(0);
if (c=='/')
{
diff --git a/jetty-http/src/test/java/org/eclipse/jetty/http/PathMapTest.java b/jetty-http/src/test/java/org/eclipse/jetty/http/PathMapTest.java
index 36e9b2e158..65481f1435 100644
--- a/jetty-http/src/test/java/org/eclipse/jetty/http/PathMapTest.java
+++ b/jetty-http/src/test/java/org/eclipse/jetty/http/PathMapTest.java
@@ -138,6 +138,8 @@ public class PathMapTest
assertTrue("!match *.foo", !PathMap.match("*.foo", "anything.bar"));
assertEquals("match / with ''", "10", p.getMatch("/").getValue());
+
+ assertTrue("match \"\"", PathMap.match("", "/"));
}
/**