mirror of
https://github.com/jetty/jetty.project.git
synced 2025-02-28 19:09:10 +00:00
Issue #5605 - java.io.IOException: unconsumed input during http request parsing.
Fixed detection of EOF in failAllContent(). Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
3a44648e46
commit
cb10c35daf
@ -130,8 +130,10 @@ public class HttpChannelOverHttp extends HttpChannel implements HttpParser.Reque
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("failing all content with {}", (Object)failure);
|
||||
if (_content != null && !_content.isSpecial())
|
||||
if (_content != null)
|
||||
{
|
||||
if (_content.isSpecial())
|
||||
return _content.isEof();
|
||||
_content.failed(failure);
|
||||
_content = _content.isEof() ? EOF : null;
|
||||
if (_content == EOF)
|
||||
@ -146,15 +148,21 @@ public class HttpChannelOverHttp extends HttpChannel implements HttpParser.Reque
|
||||
LOG.debug("failed all content, EOF was not reached");
|
||||
return false;
|
||||
}
|
||||
c.skip(c.remaining());
|
||||
c.failed(failure);
|
||||
if (c.isSpecial())
|
||||
{
|
||||
_content = c;
|
||||
boolean atEof = c.isEof();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("failed all content, EOF = {}", atEof);
|
||||
return atEof;
|
||||
}
|
||||
c.skip(c.remaining());
|
||||
c.failed(failure);
|
||||
if (c.isEof())
|
||||
{
|
||||
_content = EOF;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user