Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2015-08-13 22:24:06 -0400
committerGreg Wilkins2015-08-13 22:24:06 -0400
commit946b1476f8fc07c75ee4db424626f10d2d843882 (patch)
tree3f1512fb3c73d71aa387c560c6600a3032c5512b
parentd780839bec4d4e9940fd14ca0e3a2bb4495d45e5 (diff)
downloadorg.eclipse.jetty.project-946b1476f8fc07c75ee4db424626f10d2d843882.tar.gz
org.eclipse.jetty.project-946b1476f8fc07c75ee4db424626f10d2d843882.tar.xz
org.eclipse.jetty.project-946b1476f8fc07c75ee4db424626f10d2d843882.zip
474634 - AsyncListener.onError() handling.
reverted onComplete behaviour
-rw-r--r--jetty-server/src/main/config/etc/jetty.xml2
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java7
2 files changed, 7 insertions, 2 deletions
diff --git a/jetty-server/src/main/config/etc/jetty.xml b/jetty-server/src/main/config/etc/jetty.xml
index aa5dcd68f2..d7d295cef5 100644
--- a/jetty-server/src/main/config/etc/jetty.xml
+++ b/jetty-server/src/main/config/etc/jetty.xml
@@ -87,7 +87,7 @@
<Set name="sendDateHeader"><Property name="jetty.httpConfig.sendDateHeader" deprecated="jetty.send.date.header" default="false" /></Set>
<Set name="headerCacheSize"><Property name="jetty.httpConfig.headerCacheSize" default="512" /></Set>
<Set name="delayDispatchUntilContent"><Property name="jetty.httpConfig.delayDispatchUntilContent" deprecated="jetty.delayDispatchUntilContent" default="true"/></Set>
- <Set name="maxErrorDispatches"><Property name=jetty.httpConfig.maxErrorDispatches"/></Set>
+ <Set name="maxErrorDispatches"><Property name="jetty.httpConfig.maxErrorDispatches" default="10"/></Set>
<!-- Uncomment to enable handling of X-Forwarded- style headers
<Call name="addCustomizer">
<Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg>
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java
index 6117cb12ce..5b82fa59bc 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java
@@ -403,12 +403,17 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor
case COMPLETE:
{
+ // TODO do onComplete here for continuations to work
+ _state.onComplete();
+
if (!_response.isCommitted() && !_request.isHandled())
_response.sendError(404);
else
_response.closeOutput();
- _state.onComplete();
+ // TODO do onComplete here to detect errors in final flush
+ // _state.onComplete();
+
// TODO: verify this code is needed and whether
// TODO: it's needed for onError() case too.
_request.setHandled(true);

Back to the top