| 62 | |
| 63 | |
| 64 | class H2TestEnv(HttpdTestEnv): |
| 65 | |
| 66 | @classmethod |
| 67 | def is_unsupported(cls): |
| 68 | mpm_module = f"mpm_{os.environ['MPM']}" if 'MPM' in os.environ else 'mpm_event' |
| 69 | return mpm_module == 'mpm_prefork' |
| 70 | |
| 71 | def __init__(self, pytestconfig=None): |
| 72 | super().__init__(pytestconfig=pytestconfig) |
| 73 | self.add_httpd_conf([ |
| 74 | "H2MinWorkers 1", |
| 75 | "H2MaxWorkers 64", |
| 76 | "Protocols h2 http/1.1 h2c", |
| 77 | ]) |
| 78 | self.add_httpd_log_modules(["http2", "proxy_http2", "h2test", "proxy", "proxy_http"]) |
| 79 | self.add_cert_specs([ |
| 80 | CertificateSpec(domains=[ |
| 81 | f"push.{self._http_tld}", |
| 82 | f"hints.{self._http_tld}", |
| 83 | f"ssl.{self._http_tld}", |
| 84 | f"pad0.{self._http_tld}", |
| 85 | f"pad1.{self._http_tld}", |
| 86 | f"pad2.{self._http_tld}", |
| 87 | f"pad3.{self._http_tld}", |
| 88 | f"pad8.{self._http_tld}", |
| 89 | ]), |
| 90 | CertificateSpec(domains=[f"noh2.{self.http_tld}"], key_type='rsa2048'), |
| 91 | ]) |
| 92 | |
| 93 | def setup_httpd(self, setup: HttpdTestSetup = None): |
| 94 | super().setup_httpd(setup=H2TestSetup(env=self)) |
| 95 | |
| 96 | |
| 97 | class H2Conf(HttpdConf): |
no outgoing calls