Merge pull request #4953 from lorban/jetty-9.4.x-4855-h2spec-8-1-2-6-failure

Fix h2spec 8.1.2.6 test failure
This commit is contained in:
Simone Bordet 2020-06-09 17:07:22 +02:00 committed by GitHub
commit 1d16310bd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -320,7 +320,7 @@ public class HTTP2Stream extends IdleTimeout implements IStream, Callback, Dumpa
if (dataLength != Long.MIN_VALUE)
{
dataLength -= frame.remaining();
if (frame.isEndStream() && dataLength != 0)
if (dataLength < 0 || (frame.isEndStream() && dataLength != 0))
{
reset(new ResetFrame(streamId, ErrorCode.PROTOCOL_ERROR.code), Callback.NOOP);
callback.failed(new IOException("invalid_data_length"));