]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
test_h2_200_16, check that we have at least nghttp2 v1.45.0
authorStefan Eissing <icing@apache.org>
Tue, 2 May 2023 10:26:08 +0000 (10:26 +0000)
committerStefan Eissing <icing@apache.org>
Tue, 2 May 2023 10:26:08 +0000 (10:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909565 13f79535-47bb-0310-9956-ffa450edef68

test/modules/http2/test_200_header_invalid.py

index 6adfd45fc51de2f17bbd2c06744464ab3af2f4e2..9525954c1ac2c84e1d9e29d9afa8fe8f55765292 100644 (file)
@@ -165,6 +165,8 @@ class TestInvalidHeaders:
 
     # invalid chars in method
     def test_h2_200_16(self, env):
+        if not env.h2load_is_at_least('1.45.0'):
+            pytest.skip(f'nhttp2 version too old')
         conf = H2Conf(env)
         conf.add_vhost_cgi()
         conf.install()
@@ -173,12 +175,10 @@ class TestInvalidHeaders:
         opt = ["-H:method: GET /hello.py"]
         r = env.nghttp().get(url, options=opt)
         assert r.exit_code == 0, r
-        # nghttp version >= 1.45.0 check pseudo headers and RST streams,
-        # which means we see no response.
+        assert r.response is None
         if r.response is not None:
             assert r.response["status"] == 400
         url = env.mkurl("https", "cgi", "/proxy/hello.py")
         r = env.nghttp().get(url, options=opt)
         assert r.exit_code == 0, r
-        if r.response is not None:
-            assert r.response["status"] == 400
+        assert r.response is None