Merge pull request #2552 from eclipse/jetty-9.4.x-2549-ConsumeAll
Issue #2549 ConsumeAll forced EOF or EarlyEOF
This commit is contained in:
commit
6b7f4c91db
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -679,11 +679,16 @@ public class HttpInput extends ServletInputStream implements Runnable
|
|||
|
||||
skip(item, item.remaining());
|
||||
}
|
||||
return isFinished() && !isError();
|
||||
if (isFinished())
|
||||
return !isError();
|
||||
|
||||
_state = EARLY_EOF;
|
||||
return false;
|
||||
}
|
||||
catch (IOException e)
|
||||
catch (Throwable e)
|
||||
{
|
||||
LOG.debug(e);
|
||||
_state = new ErrorState(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue