From 0abda0f35a10929c1cad64349666e8f05c19893c Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 5 May 2014 19:49:58 +0200 Subject: [PATCH] 434074 Avoid double dispatch by returning false from messageComplete --- .../java/org/eclipse/jetty/server/HttpConnection.java | 8 ++++++++ .../jetty/server/SlowClientWithPipelinedRequestTest.java | 1 - .../server/handler/ContextHandlerGetResourceTest.java | 1 - .../jetty/spdy/server/http/HttpChannelOverSPDY.java | 7 +++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java index 10c9a1dd4de..c56222fb462 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java @@ -478,6 +478,14 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http { getEndPoint().shutdownOutput(); } + + + @Override + public boolean messageComplete() + { + super.messageComplete(); + return false; + } } private class CommitCallback extends IteratingCallback diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/SlowClientWithPipelinedRequestTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/SlowClientWithPipelinedRequestTest.java index b86badfa192..599c474d7d4 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/SlowClientWithPipelinedRequestTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/SlowClientWithPipelinedRequestTest.java @@ -93,7 +93,6 @@ public class SlowClientWithPipelinedRequestTest throws IOException, ServletException { baseRequest.setHandled(true); - System.err.println("target = " + target); if ("/content".equals(target)) { // We simulate what the DefaultServlet does, bypassing the blocking diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerGetResourceTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerGetResourceTest.java index 5534dedb52a..3ba83f6ed9d 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerGetResourceTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerGetResourceTest.java @@ -73,7 +73,6 @@ public class ContextHandlerGetResourceTest other.createNewFile(); File transit = new File(docroot.getParentFile(),"transit"); - System.err.println("transit "+transit); transit.delete(); if (OS.IS_UNIX) diff --git a/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpChannelOverSPDY.java b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpChannelOverSPDY.java index 575b940a93c..d032aa1c9e3 100644 --- a/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpChannelOverSPDY.java +++ b/jetty-spdy/spdy-http-server/src/main/java/org/eclipse/jetty/spdy/server/http/HttpChannelOverSPDY.java @@ -156,6 +156,13 @@ public class HttpChannelOverSPDY extends HttpChannel if (dispatch) dispatch(); } + + @Override + public boolean messageComplete() + { + super.messageComplete(); + return false; + } private boolean performBeginRequest(Fields headers) {