This is an automated email from the ASF dual-hosted git repository.

lihan pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new eb51363de4 Fix BZ 66602 - skip sending the WINDOW_UPDATE frame if the 
increment is zero.
eb51363de4 is described below

commit eb51363de43e2b1c16ecc48cd968a9a497374576
Author: ledefe <led...@qq.com>
AuthorDate: Fri May 19 13:24:50 2023 +0800

    Fix BZ 66602 - skip sending the WINDOW_UPDATE frame if the increment is 
zero.
    
    Closes #619
    https://bz.apache.org/bugzilla/show_bug.cgi?id=66602
---
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 4 +++-
 webapps/docs/changelog.xml                            | 5 +++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 63586fc756..e653611498 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -1514,7 +1514,9 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
             // the call to this method. This means the bytes read will have 
been
             // written to the original stream and, effectively, swallowed.
             // Therefore, need to notify that those bytes were swallowed here.
-            onSwallowedDataFramePayload(streamId, dataLength);
+            if (dataLength>0) {
+                onSwallowedDataFramePayload(streamId, dataLength);
+            }
         }
     }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9413908290..978c599ab9 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -125,6 +125,11 @@
         defined in RFC 9218 rather than the one defined in RFC 7540.
         (markt)
       </update>
+      <fix>
+        <bug>66602</bug>: not sending WINDOW_UPDATE when dataLength is ZERO
+        on call SwallowedDataFramePayload. Pull request #619 by
+        ledefe. (lihan)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Other">


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

Reply via email to