This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new b1e6a14c1a Make automatic ACK for settings configurable
b1e6a14c1a is described below
commit b1e6a14c1ab99ed44dacc6bad70d9aafcb71a66a
Author: Mark Thomas <[email protected]>
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 bcee87916a..1821bb77ff 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: [email protected]
For additional commands, e-mail: [email protected]