diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java index 54b2f98202f..66d69c29d0e 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java @@ -76,7 +76,7 @@ public class HttpFields implements Iterable */ public HttpFields(HttpFields fields) { - _fields=Arrays.copyOf(fields._fields,_fields.length+10); + _fields=Arrays.copyOf(fields._fields,fields._fields.length+10); _size=fields._size; } diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Dispatcher.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Dispatcher.java index e1b563b381d..c105b3cfd78 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Dispatcher.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Dispatcher.java @@ -236,6 +236,12 @@ public class Dispatcher implements RequestDispatcher baseRequest.getHttpChannel().getHttpTransport().push(push); } + + @Override + public String toString() + { + return String.format("Dispatcher@0x%x{%s,%s}",hashCode(),_named,_uri); + } private void commitResponse(ServletResponse response, Request baseRequest) throws IOException { diff --git a/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/web.xml b/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/web.xml index a2b37637578..81a3a4cd77a 100644 --- a/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/web.xml +++ b/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/web.xml @@ -18,6 +18,15 @@ com.acme.TestListener + + PushFilter + org.eclipse.jetty.servlets.PushCacheFilter + true + + + PushFilter + /* + QoSFilter diff --git a/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java b/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java index 485ffeb4878..e10e6d0a529 100644 --- a/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java +++ b/tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java @@ -158,6 +158,7 @@ public class TestServer server.setStopAtShutdown(true); WebAppContext webapp = new WebAppContext(); + webapp.setContextPath("/test"); webapp.setParentLoaderPriority(true); webapp.setResourceBase("./src/main/webapp"); webapp.setAttribute("testAttribute","testValue");