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 58f4329553 Make automatic ACK for settings configurable
58f4329553 is described below

commit 58f432955394e1072eda4a61a1ec6393e5d869a4
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jul 1 12:16:27 2025 +0100

    Make automatic ACK for settings configurable
---
 test/org/apache/coyote/http2/Http2TestBase.java | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/coyote/http2/Http2TestBase.java 
b/test/org/apache/coyote/http2/Http2TestBase.java
index 999f9057e0..c900f00bf9 100644
--- a/test/org/apache/coyote/http2/Http2TestBase.java
+++ b/test/org/apache/coyote/http2/Http2TestBase.java
@@ -668,6 +668,11 @@ public abstract class Http2TestBase extends TomcatBaseTest 
{
     }
 
     protected void openClientConnection(boolean tls) throws IOException {
+        openClientConnection(tls, true);
+    }
+
+    protected void openClientConnection(boolean tls, boolean autoAckSettings) 
throws IOException {
+
         SocketFactory socketFactory = tls ? TesterSupport.configureClientSsl() 
: SocketFactory.getDefault();
         // Open a connection
         s = socketFactory.createSocket("localhost", getPort());
@@ -677,7 +682,7 @@ public abstract class Http2TestBase extends TomcatBaseTest {
         InputStream is = s.getInputStream();
 
         input = new TestInput(is);
-        output = new TestOutput();
+        output = new TestOutput(autoAckSettings);
         parser = new TesterHttp2Parser("-1", input, output);
         hpackEncoder = new HpackEncoder();
     }
@@ -1062,6 +1067,8 @@ public abstract class Http2TestBase extends 
TomcatBaseTest {
 
     public class TestOutput implements Output, HeaderEmitter {
 
+        private final boolean autoAckSettings;
+
         private StringBuffer trace = new StringBuffer();
         private String lastStreamId = "0";
         private ConnectionSettingsRemote remoteSettings = new 
ConnectionSettingsRemote("-1");
@@ -1070,6 +1077,10 @@ public abstract class Http2TestBase extends 
TomcatBaseTest {
         private long bytesRead;
         private volatile HpackDecoder hpackDecoder = null;
 
+        public TestOutput(boolean autoAckSettings) {
+            this.autoAckSettings = autoAckSettings;
+        }
+
         public void setTraceBody(boolean traceBody) {
             this.traceBody = traceBody;
         }
@@ -1200,7 +1211,9 @@ public abstract class Http2TestBase extends 
TomcatBaseTest {
                 trace.append("0-Settings-Ack\n");
             } else {
                 trace.append("0-Settings-End\n");
-                sendSettings(0, true);
+                if (autoAckSettings) {
+                    sendSettings(0, true);
+                }
             }
         }
 


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

Reply via email to