(self, env, via, seen)
| 106 | ["mixed", "faked"], |
| 107 | ]) |
| 108 | def test_proxy_02_002(self, env, via, seen): |
| 109 | # make requests to a forward proxy https: vhost to the http: vhost |
| 110 | # check that we see the document we expect there (host matching worked) |
| 111 | # we need to explicitly provide a Host: header since mod_proxy cannot |
| 112 | # resolve the name via DNS. |
| 113 | if not env.curl_is_at_least('8.0.0'): |
| 114 | pytest.skip(f'need at least curl v8.0.0 for this') |
| 115 | domain = f"{via}.{env.http_tld}" |
| 116 | r = env.curl_get(f"http://127.0.0.1:{env.http_port}/alive.json", 5, options=[ |
| 117 | '-H', f"Host: {domain}", |
| 118 | '--proxy', f"https://{domain}:{env.https_port}/", |
| 119 | '--resolve', f"{domain}:{env.https_port}:127.0.0.1", |
| 120 | '--proxy-cacert', f"{env.get_ca_pem_file(domain)}", |
| 121 | |
| 122 | ]) |
| 123 | assert r.exit_code == 0, f"{r.stdout}{r.stderr}" |
| 124 | assert r.response["status"] == 200 |
| 125 | assert r.json['host'] == seen |
| 126 | |
| 127 | @pytest.mark.parametrize(["via", "exp_status"], [ |
| 128 | ["reverse", 400], |
nothing calls this directly
no test coverage detected