diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java index 7bd33d82dca..05b445069cf 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java @@ -2446,8 +2446,7 @@ public class Request implements HttpServletRequest { throw new ServletException("HttpServletRequest.upgrade() not supported in Jetty"); } - - + public void setPathSpec(PathSpec pathSpec) { _pathSpec = pathSpec; @@ -2457,10 +2456,9 @@ public class Request implements HttpServletRequest { return _pathSpec; } - - // TODO replace with overriden version from API - public HttpServletMapping getMapping() + @Override + public HttpServletMapping getHttpServletMapping() { final PathSpec pathSpec = _pathSpec; final MappingMatch match; @@ -2479,7 +2477,7 @@ public class Request implements HttpServletRequest break; case EXACT: match = MappingMatch.EXACT; - mapping = _servletPath; + mapping = _servletPath.startsWith("/")?_servletPath.substring(1):_servletPath; break; case SUFFIX_GLOB: match = MappingMatch.EXTENSION; diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/IPAddressMapTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/IPAddressMapTest.java index f9f657904cc..6f1b65af4aa 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/IPAddressMapTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/IPAddressMapTest.java @@ -24,7 +24,7 @@ import static org.junit.Assert.assertNull; import org.junit.Test; - +@Deprecated public class IPAddressMapTest { @Test