From c69ab6bd562dcc2bf2862e89ccc6d8e82fb3d426 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Fri, 18 May 2018 16:39:44 +1000 Subject: [PATCH] Issue #2549 ConsumeAll forced EOF or EarlyEOF Cleanup after review Signed-off-by: Greg Wilkins --- .../java/org/eclipse/jetty/server/HttpInput.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java index 31d176c5bec..1a491a4c069 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java @@ -679,17 +679,17 @@ public class HttpInput extends ServletInputStream implements Runnable skip(item, item.remaining()); } - return isFinished() && !isError(); - } - catch (IOException e) - { - LOG.debug(e); + if (isFinished()) + return !isError(); + + _state = EARLY_EOF; return false; } - finally + catch (Throwable e) { - if (!EOFState.class.isInstance(_state)) - _state = EARLY_EOF; + LOG.debug(e); + _state = new ErrorState(e); + return false; } } }