diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletPathMapping.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletPathMapping.java index 2fdb0e4dc045..8eb7af4cfeb2 100644 --- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletPathMapping.java +++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletPathMapping.java @@ -98,7 +98,6 @@ else if (pathSpec != null) } else { - // TODO can we do better for RegexPathSpec _mappingMatch = null; _matchValue = ""; _servletPath = pathInContext; diff --git a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/RequestTest.java b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/RequestTest.java index 872358254255..0ee58ab9dbd8 100644 --- a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/RequestTest.java +++ b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/RequestTest.java @@ -64,6 +64,7 @@ import org.eclipse.jetty.http.MetaData; import org.eclipse.jetty.http.MimeTypes; import org.eclipse.jetty.http.UriCompliance; +import org.eclipse.jetty.http.pathmap.RegexPathSpec; import org.eclipse.jetty.http.pathmap.MatchedPath; import org.eclipse.jetty.http.pathmap.RegexPathSpec; import org.eclipse.jetty.http.pathmap.ServletPathSpec; @@ -469,7 +470,7 @@ public void testMultiPart() throws Exception return s.count() == 2; } }; - + _server.stop(); _context.setContextPath("/foo"); _context.setResourceBase("."); @@ -1686,11 +1687,11 @@ public void testCookieLeak() throws Exception assertEquals("value", cookies[0]); assertNull(cookies[1]); } - + /** * Test that multiple requests on the same connection with different cookies * do not bleed cookies. - * + * * @throws Exception */ @Test @@ -1733,7 +1734,7 @@ public void handle(String target, Request baseRequest, HttpServletRequest reques response = HttpTester.parseResponse(lep.getResponse()); checkCookieResult(sessionId3, new String[] {sessionId1, sessionId2}, response.getContent()); } - + @Test public void testHashDOSKeys() throws Exception { @@ -2402,7 +2403,7 @@ public void clearAttributes() { } } - + private static void checkCookieResult(String containedCookie, String[] notContainedCookies, String response) { assertNotNull(containedCookie); diff --git a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/RegexServletTest.java b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/RegexServletTest.java index 6522900ce039..571f72a65c22 100644 --- a/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/RegexServletTest.java +++ b/jetty-ee9/jetty-ee9-servlet/src/test/java/org/eclipse/jetty/ee9/servlet/RegexServletTest.java @@ -79,7 +79,7 @@ public void testMapping() throws Exception assertThat(response, containsString("servletPath='/test/info'")); assertThat(response, containsString("pathInfo='null'")); assertThat(response, containsString("mapping.mappingMatch='null'")); - assertThat(response, containsString("mapping.matchValue=''")); + assertThat(response, containsString("mapping.matchValue='test/info'")); assertThat(response, containsString("mapping.pattern='^/test/.*$'")); } @@ -96,7 +96,7 @@ public void testForward() throws Exception assertThat(response, containsString("servletPath='/Test/info'")); assertThat(response, containsString("pathInfo='null'")); assertThat(response, containsString("mapping.mappingMatch='null'")); - assertThat(response, containsString("mapping.matchValue=''")); + assertThat(response, containsString("mapping.matchValue='Test/info'")); assertThat(response, containsString("mapping.pattern='^/[Tt]est(/.*)?'")); } @@ -113,7 +113,7 @@ public void testInclude() throws Exception assertThat(response, containsString("servletPath='/include'")); assertThat(response, containsString("pathInfo='null'")); assertThat(response, containsString("mapping.mappingMatch='null'")); - assertThat(response, containsString("mapping.matchValue=''")); + assertThat(response, containsString("mapping.matchValue='include'")); assertThat(response, containsString("mapping.pattern='^/include$'")); }