(self, env, via, seen)
| 55 | ["mixed", "generic"], |
| 56 | ]) |
| 57 | def test_proxy_01_002(self, env, via, seen): |
| 58 | # make requests to a forward proxy https: vhost to the http: vhost |
| 59 | # check that we see the document we expect there (host matching worked) |
| 60 | # we need to explicitly provide a Host: header since mod_proxy cannot |
| 61 | # resolve the name via DNS. |
| 62 | if not env.curl_is_at_least('8.0.0'): |
| 63 | pytest.skip(f'need at least curl v8.0.0 for this') |
| 64 | domain = f"{via}.{env.http_tld}" |
| 65 | r = env.curl_get(f"http://127.0.0.1:{env.http_port}/alive.json", 5, options=[ |
| 66 | '-H', f"Host: {domain}", |
| 67 | '--proxy', f"https://{domain}:{env.https_port}/", |
| 68 | '--resolve', f"{domain}:{env.https_port}:127.0.0.1", |
| 69 | '--proxy-cacert', f"{env.get_ca_pem_file(domain)}", |
| 70 | |
| 71 | ]) |
| 72 | assert r.exit_code == 0, f"{r.stdout}{r.stderr}" |
| 73 | assert r.response["status"] == 200 |
| 74 | assert r.json['host'] == seen |
| 75 | |
| 76 | def test_proxy_01_003(self, env): |
| 77 | domain = f"test1.{env.http_tld}" |
nothing calls this directly
no test coverage detected