Issue #2549 ConsumeAll forced EOF or EarlyEOF
Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
parent
aa97518d0b
commit
b93cc5abb6
|
@ -102,8 +102,8 @@ public class HttpChannelOverHTTP extends HttpChannel
|
||||||
if ((response.getVersion() == HttpVersion.HTTP_1_1) &&
|
if ((response.getVersion() == HttpVersion.HTTP_1_1) &&
|
||||||
(response.getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101))
|
(response.getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101))
|
||||||
{
|
{
|
||||||
String connection = response.getHeaders().get(HttpHeader.CONNECTION);
|
String next_connection = response.getHeaders().get(HttpHeader.CONNECTION);
|
||||||
if ((connection == null) || !connection.toLowerCase(Locale.US).contains("upgrade"))
|
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));
|
return new Result(result,new HttpResponseException("101 Switching Protocols without Connection: Upgrade not supported",response));
|
||||||
}
|
}
|
||||||
|
|
|
@ -686,6 +686,11 @@ public class HttpInput extends ServletInputStream implements Runnable
|
||||||
LOG.debug(e);
|
LOG.debug(e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (!EOFState.class.isInstance(_state))
|
||||||
|
_state = EARLY_EOF;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue