From: Stefan Eissing Date: Tue, 2 May 2023 10:26:08 +0000 (+0000) Subject: test_h2_200_16, check that we have at least nghttp2 v1.45.0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=751a260cd24d49b3c21d06745eb1dfbcec130a26;p=thirdparty%2Fapache%2Fhttpd.git test_h2_200_16, check that we have at least nghttp2 v1.45.0 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909565 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/modules/http2/test_200_header_invalid.py b/test/modules/http2/test_200_header_invalid.py index 6adfd45fc51..9525954c1ac 100644 --- a/test/modules/http2/test_200_header_invalid.py +++ b/test/modules/http2/test_200_header_invalid.py @@ -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