diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/AsyncRequest.java b/jetty-server/src/main/java/org/eclipse/jetty/server/AsyncRequest.java index f7005cfe813..29d593f5297 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/AsyncRequest.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/AsyncRequest.java @@ -412,10 +412,9 @@ public class AsyncRequest implements AsyncContext, Continuation { case __SUSPENDING: case __SUSPENDED: - if (false) // TODO - dispatch(); - else - complete(); + dispatch(); + return; + default: return; } diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java index 4c9a3464b45..4a3e838d03c 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java @@ -170,7 +170,7 @@ public class ContextHandlerCollection extends HandlerCollection Request base_request = HttpConnection.getCurrentConnection().getRequest(); AsyncRequest async = base_request.getAsyncRequest(); - if (async!=null) + if (async.isAsync()) { ContextHandler context=async.getContextHandler(); if (context!=null)