You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/06/15 08:20:48 UTC

[tomcat] branch 9.0.x updated: Fix HTTP/2 tests broken by changes to small window update frames

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

markt 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 b6034a4  Fix HTTP/2 tests broken by changes to small window update frames
b6034a4 is described below

commit b6034a458cb6d00ef7bd4297d5406669fa89f4f7
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jun 15 09:16:31 2021 +0100

    Fix HTTP/2 tests broken by changes to small window update frames
---
 test/org/apache/coyote/http2/TestHttp2Limits.java      |  2 ++
 test/org/apache/coyote/http2/TestHttp2Section_6_1.java | 10 ++++++++++
 test/org/apache/coyote/http2/TestHttp2Section_6_9.java |  3 +++
 test/org/apache/coyote/http2/TestHttp2Section_8_1.java |  6 ++++++
 4 files changed, 21 insertions(+)

diff --git a/test/org/apache/coyote/http2/TestHttp2Limits.java b/test/org/apache/coyote/http2/TestHttp2Limits.java
index 07ff7ed..957c747 100644
--- a/test/org/apache/coyote/http2/TestHttp2Limits.java
+++ b/test/org/apache/coyote/http2/TestHttp2Limits.java
@@ -474,6 +474,8 @@ public class TestHttp2Limits extends Http2TestBase {
         http2Protocol.setAllowedTrailerHeaders(TRAILER_HEADER_NAME);
         http2Protocol.setMaxTrailerCount(maxTrailerCount);
         http2Protocol.setMaxTrailerSize(maxTrailerSize);
+        // Disable overhead protection for window update as it breaks some tests
+        http2Protocol.setOverheadWindowUpdateThreshold(0);
 
         configureAndStartWebApplication();
         openClientConnection();
diff --git a/test/org/apache/coyote/http2/TestHttp2Section_6_1.java b/test/org/apache/coyote/http2/TestHttp2Section_6_1.java
index 8e3d948..27a6223 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_6_1.java
+++ b/test/org/apache/coyote/http2/TestHttp2Section_6_1.java
@@ -35,6 +35,9 @@ public class TestHttp2Section_6_1 extends Http2TestBase {
     public void testDataFrame() throws Exception {
         http2Connect();
 
+        // Disable overhead protection for window update as it breaks the test
+        http2Protocol.setOverheadWindowUpdateThreshold(0);
+
         sendSimplePostRequest(3, null);
         readSimplePostResponse(false);
 
@@ -57,6 +60,10 @@ public class TestHttp2Section_6_1 extends Http2TestBase {
         try {
             http2Connect();
 
+            // Disable overhead protection for window update as it breaks the
+            // test
+            http2Protocol.setOverheadWindowUpdateThreshold(0);
+
             byte[] padding = new byte[8];
 
             sendSimplePostRequest(3, padding);
@@ -159,6 +166,9 @@ public class TestHttp2Section_6_1 extends Http2TestBase {
     public void testDataFrameWithZeroLengthPadding() throws Exception {
         http2Connect();
 
+        // Disable overhead protection for window update as it breaks the test
+        http2Protocol.setOverheadWindowUpdateThreshold(0);
+
         byte[] padding = new byte[0];
 
         sendSimplePostRequest(3, padding);
diff --git a/test/org/apache/coyote/http2/TestHttp2Section_6_9.java b/test/org/apache/coyote/http2/TestHttp2Section_6_9.java
index 02d24eb..dd77220 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_6_9.java
+++ b/test/org/apache/coyote/http2/TestHttp2Section_6_9.java
@@ -152,6 +152,9 @@ public class TestHttp2Section_6_9 extends Http2TestBase {
     public void testWindowSizeAndSettingsFrame() throws Exception {
         http2Connect();
 
+        // Disable overhead protection for window update as it breaks the test
+        http2Protocol.setOverheadWindowUpdateThreshold(0);
+
         // Set up a POST request that echoes the body back
         byte[] headersFrameHeader = new byte[9];
         ByteBuffer headersPayload = ByteBuffer.allocate(128);
diff --git a/test/org/apache/coyote/http2/TestHttp2Section_8_1.java b/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
index 83a831f..da694e4 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
+++ b/test/org/apache/coyote/http2/TestHttp2Section_8_1.java
@@ -54,6 +54,9 @@ public class TestHttp2Section_8_1 extends Http2TestBase {
             http2Protocol.setAllowedTrailerHeaders(TRAILER_HEADER_NAME);
         }
 
+        // Disable overhead protection for window update as it breaks some tests
+        http2Protocol.setOverheadWindowUpdateThreshold(0);
+
         byte[] headersFrameHeader = new byte[9];
         ByteBuffer headersPayload = ByteBuffer.allocate(128);
         byte[] dataFrameHeader = new byte[9];
@@ -135,6 +138,9 @@ public class TestHttp2Section_8_1 extends Http2TestBase {
         // Request verify that the various policies are implemented.
         http2Connect();
 
+        // Disable overhead protection for window update as it breaks some tests
+        http2Protocol.setOverheadWindowUpdateThreshold(0);
+
         byte[] headersFrameHeader = new byte[9];
         ByteBuffer headersPayload = ByteBuffer.allocate(128);
         byte[] dataFrameHeader = new byte[9];

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