This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new b90393e Try swapping the headers complete processing order b90393e is described below commit b90393e523abfd24f620c29e30d3c13837c3ed49 Author: remm <r...@apache.org> AuthorDate: Mon Apr 15 10:57:02 2019 +0200 Try swapping the headers complete processing order First update state as needed, then dispatch the new request, even though it is a bit counter intuitive. --- java/org/apache/coyote/http2/Http2Parser.java | 4 ++-- test/org/apache/coyote/http2/TestStream.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/java/org/apache/coyote/http2/Http2Parser.java b/java/org/apache/coyote/http2/Http2Parser.java index f5e1986..967175f 100644 --- a/java/org/apache/coyote/http2/Http2Parser.java +++ b/java/org/apache/coyote/http2/Http2Parser.java @@ -580,13 +580,13 @@ class Http2Parser { // going to be thrown. hpackDecoder.getHeaderEmitter().validateHeaders(); - output.headersEnd(streamId); - if (headersEndStream) { output.receivedEndOfStream(streamId); headersEndStream = false; } + output.headersEnd(streamId); + // Reset size for new request if the buffer was previously expanded if (headerReadBuffer.capacity() > Constants.DEFAULT_HEADER_READ_BUFFER_SIZE) { headerReadBuffer = ByteBuffer.allocate(Constants.DEFAULT_HEADER_READ_BUFFER_SIZE); diff --git a/test/org/apache/coyote/http2/TestStream.java b/test/org/apache/coyote/http2/TestStream.java index 2d03035..0afaebc 100644 --- a/test/org/apache/coyote/http2/TestStream.java +++ b/test/org/apache/coyote/http2/TestStream.java @@ -121,8 +121,8 @@ public class TestStream extends Http2TestBase { "3-HeadersStart\n" + "3-Header-[x-trailer-2]-[Trailer value two]\n" + "3-Header-[x-trailer-1]-[Trailer value one]\n" + - "3-HeadersEnd\n" + - "3-EndOfStream\n", output.getTrace()); + "3-EndOfStream\n" + + "3-HeadersEnd\n", output.getTrace()); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org