Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--VERSION.txt1
-rw-r--r--jetty-http/src/main/java/org/eclipse/jetty/http/PathMap.java7
-rw-r--r--jetty-http/src/test/java/org/eclipse/jetty/http/PathMapTest.java3
3 files changed, 9 insertions, 2 deletions
diff --git a/VERSION.txt b/VERSION.txt
index 67095a6918..3edc0ef961 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -16,6 +16,7 @@ jetty-7.0.0.M3 20 June 2009
+ Refactored AbstractBuffers to HttpBuffers for performance
+ Numerous cleanups from static code analysis
+ 280707 client.HttpConnection does not catch and handle non-IOExceptions
+ + 281470 Handle the case where request.PathInfo() should be "/*"
jetty-7.0.0.M2 18 May 2009
+ JETTY-937 Work around Sun JVM bugs
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 f8b8e0f0c6..0bfc6c5348 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
@@ -461,10 +461,13 @@ public class PathMap extends HashMap implements Externalizable
if (pathSpec.length()==1)
return null;
- if (pathSpec.equals(path))
+ boolean wildcard = isPathWildcardMatch(pathSpec, path);
+
+ // handle the case where pathSpec uses a wildcard and path info is "/*"
+ if (pathSpec.equals(path) && !wildcard)
return null;
- if (isPathWildcardMatch(pathSpec, path))
+ if (wildcard)
{
if (path.length()==pathSpec.length()-2)
return null;
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 a9b2320f01..dffa6f2cd5 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
@@ -77,6 +77,8 @@ public class PathMapTest extends TestCase
{ "/animal/insect/bug", "5"},
{ "/animal", "5"},
{ "/animal/", "5"},
+ { "/animal/x", "5"},
+ { "/animal/*", "5"},
{ "/suffix/path.tar.gz", "6"},
{ "/suffix/path.gz", "7"},
{ "/animal/path.gz", "5"},
@@ -105,6 +107,7 @@ public class PathMapTest extends TestCase
assertEquals("pathInfo exact", null, PathMap.pathInfo("/Foo/bar", "/Foo/bar"));
assertEquals("pathInfo prefix", "/bar", PathMap.pathInfo("/Foo/*", "/Foo/bar"));
+ assertEquals("pathInfo prefix", "/*", PathMap.pathInfo("/Foo/*", "/Foo/*"));
assertEquals("pathInfo prefix", "/", PathMap.pathInfo("/Foo/*", "/Foo/"));
assertEquals("pathInfo prefix", null, PathMap.pathInfo("/Foo/*", "/Foo"));
assertEquals("pathInfo suffix", null, PathMap.pathInfo("*.ext", "/Foo/bar.ext"));

Back to the top