This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 d54a13c82e Test HTTP/2 handling of undefined flags (#1105)
d54a13c82e is described below
commit d54a13c82e133bfa081d6a859d5991c46760d78d
Author: sainadh777 <[email protected]>
AuthorDate: Wed Nov 4 02:05:50 2026 -0800
Test HTTP/2 handling of undefined flags (#1105)
---
.../apache/coyote/http2/TestHttp2Section_4_1.java | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/test/org/apache/coyote/http2/TestHttp2Section_4_1.java
b/test/org/apache/coyote/http2/TestHttp2Section_4_1.java
index 35872befac..a2da8669a9 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_4_1.java
+++ b/test/org/apache/coyote/http2/TestHttp2Section_4_1.java
@@ -43,7 +43,25 @@ public class TestHttp2Section_4_1 extends Http2TestBase {
}
- // TODO: Tests for unexpected flags. Better located in tests for section 6?
+ @Test
+ public void testUnknownFlagsIgnored() throws Exception {
+ // HTTP2 upgrade
+ http2Connect();
+
+ // Build the simple request
+ byte[] frameHeader = new byte[9];
+ ByteBuffer headersPayload = ByteBuffer.allocate(128);
+ buildSimpleGetRequest(frameHeader, headersPayload, null, 3);
+
+ // Set an undefined flag
+ frameHeader[4] = (byte) (frameHeader[4] | 0x02);
+
+ // Process the request
+ writeFrame(frameHeader, headersPayload);
+
+ readSimpleGetResponse();
+ Assert.assertEquals(getSimpleResponseTrace(3), output.getTrace());
+ }
@Test
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]