]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
test/modules/http2: Enrich test with cookie header
authorGiannis Christodoulou <ichristod@apache.org>
Wed, 10 Jun 2026 12:16:14 +0000 (12:16 +0000)
committerGiannis Christodoulou <ichristod@apache.org>
Wed, 10 Jun 2026 12:16:14 +0000 (12:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1935180 13f79535-47bb-0310-9956-ffa450edef68

test/modules/http2/test_200_header_invalid.py

index adb203b5b6b55bd2854acd1356a1f54dd3936e9c..a3c2928d592937cb6b4be2e09dcff314bfbaca13 100644 (file)
@@ -168,11 +168,13 @@ class TestInvalidHeaders:
         conf.install()
         assert env.apache_restart() == 0
         url = env.mkurl("https", "cgi", "/")
-        opt = []
-        for i in range(21):
-            opt += ["-H", "x{0}: 1".format(i)]
-        r = env.curl_get(url, options=opt)
-        assert 431 == r.response["status"]
+
+        for desc, opts in [
+            ("regular", [v for i in range(21) for v in ("-H", f"x{i}: 1")]),
+            ("cookie",  [v for i in range(21) for v in ("-H", f"cookie: c{i}=v{i}")]),
+        ]:
+            r = env.curl_get(url, options=opts)
+            assert r.response["status"] == 431, f"{desc} header failed"
         conf = H2Conf(env)
         conf.add("""
             LimitRequestFields 0