Issue #2549 ConsumeAll forced EOF or EarlyEOF

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2018-05-17 13:05:13 +10:00
parent aa97518d0b
commit b93cc5abb6
2 changed files with 7 additions and 2 deletions

View File

@ -102,8 +102,8 @@ public class HttpChannelOverHTTP extends HttpChannel
if ((response.getVersion() == HttpVersion.HTTP_1_1) &&
(response.getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101))
{
String connection = response.getHeaders().get(HttpHeader.CONNECTION);
if ((connection == null) || !connection.toLowerCase(Locale.US).contains("upgrade"))
String next_connection = response.getHeaders().get(HttpHeader.CONNECTION);
if ((next_connection == null) || !next_connection.toLowerCase(Locale.US).contains("upgrade"))
{
return new Result(result,new HttpResponseException("101 Switching Protocols without Connection: Upgrade not supported",response));
}

View File

@ -686,6 +686,11 @@ public class HttpInput extends ServletInputStream implements Runnable
LOG.debug(e);
return false;
}
finally
{
if (!EOFState.class.isInstance(_state))
_state = EARLY_EOF;
}
}
}