This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push: new 52fd25180f Make automatic ACK for settings configurable 52fd25180f is described below commit 52fd25180fc2dc4866ff53b2079bf797301c0eb5 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 60b3f3128f..f1fe36890c 100644 --- a/test/org/apache/coyote/http2/Http2TestBase.java +++ b/test/org/apache/coyote/http2/Http2TestBase.java @@ -671,6 +671,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()); @@ -680,7 +685,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(); } @@ -1065,6 +1070,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"); @@ -1073,6 +1080,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; } @@ -1203,7 +1214,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