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 49ff470  Sync to avoid apparent HTTP/2 state problems
49ff470 is described below

commit 49ff4703e46feb23ec1dd3a9f3576231446f6dee
Author: remm <r...@apache.org>
AuthorDate: Thu May 23 22:10:55 2019 +0200

    Sync to avoid apparent HTTP/2 state problems
    
    Using the HTTP/2 demo page (the one with 100s of tomcat.gif that was
    used at ApacheCons in the past), I could see some errors caused by the
    state check line 1530 in Http2UpgradeHandler, the state being CLOSED_RX
    (so no window updating).
---
 java/org/apache/coyote/http2/Http2AsyncParser.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/java/org/apache/coyote/http2/Http2AsyncParser.java 
b/java/org/apache/coyote/http2/Http2AsyncParser.java
index 827105a..84342a4 100644
--- a/java/org/apache/coyote/http2/Http2AsyncParser.java
+++ b/java/org/apache/coyote/http2/Http2AsyncParser.java
@@ -240,6 +240,8 @@ class Http2AsyncParser extends Http2Parser {
                         if (streamException) {
                             swallow(streamId, payloadSize, false, payload);
                         } else {
+                            // TODO: Find why this sync is needed
+                            synchronized (input) {
                             switch (frameType) {
                             case DATA:
                                 readDataFrame(streamId, flags, payloadSize, 
payload);
@@ -274,6 +276,7 @@ class Http2AsyncParser extends Http2Parser {
                             case UNKNOWN:
                                 readUnknownFrame(streamId, frameType, flags, 
payloadSize, payload);
                             }
+                            }
                         }
                         // See if there is a new 9 byte header and continue 
parsing if possible
                         if (payload.remaining() >= 9) {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to