Issue #5605 - java.io.IOException: unconsumed input during http request parsing.

Fixed FCGI's failAllContent() to correctly return whether it has seen EOF.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2020-11-19 11:00:56 +01:00
parent 899e5fc0f9
commit 9caabea6bb
1 changed files with 5 additions and 2 deletions

View File

@ -123,8 +123,11 @@ public class HttpChannelOverFCGI extends HttpChannel
_contentQueue.clear();
}
copy.forEach(c -> c.failed(failure));
HttpInput.Content lastContent = copy.isEmpty() ? null : copy.get(copy.size() - 1);
boolean atEof = lastContent != null && lastContent.isEof();
boolean atEof;
try (AutoLock l = _lock.lock())
{
atEof = _specialContent != null && _specialContent.isEof();
}
if (LOG.isDebugEnabled())
LOG.debug("failed all content, EOF = {}", atEof);
return atEof;