From 1d5998f02e43ff9e081583a84fcc4525965b5ab7 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 7 Aug 2014 15:05:22 +1000 Subject: [PATCH] 441073 isEarlyEOF on HttpInput --- .../java/org/eclipse/jetty/server/HttpInput.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 dc3e6dcbca9..0dd86fb91c4 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 @@ -248,6 +248,15 @@ public abstract class HttpInput extends ServletInputStream implements Runnabl _channelState.onReadPossible(); } + + public boolean isEarlyEOF() + { + synchronized (lock()) + { + return _contentState==EARLY_EOF; + } + } + /** * This method should be called to signal that all the expected * content arrived. @@ -317,6 +326,7 @@ public abstract class HttpInput extends ServletInputStream implements Runnabl return _contentState.isEOF(); } } + @Override public boolean isReady() @@ -473,7 +483,7 @@ public abstract class HttpInput extends ServletInputStream implements Runnabl @Override public int noContent() throws IOException { - throw new EofException(); + throw new EofException("Early EOF"); } @Override