(self, env, via, exp_status)
| 130 | ["mixed", 500], |
| 131 | ]) |
| 132 | def test_proxy_02_003(self, env, via, exp_status): |
| 133 | # make requests to a forward proxy https: vhost and GET |
| 134 | # a URL which carries the unix: domain socket. |
| 135 | # This needs to fail. |
| 136 | domain = f"{via}.{env.http_tld}" |
| 137 | r = env.run(args=[ |
| 138 | 'openssl', 's_client', '-connect', f"127.0.0.1:{env.https_port}", |
| 139 | '-servername', domain, |
| 140 | '-crlf', '-ign_eof', |
| 141 | '-CAfile', env.get_ca_pem_file(domain) |
| 142 | ], intext=f"""GET unix:{TestProxyUds.UDS_PATH}|http://127.0.0.1:{env.http_port}/alive.json HTTP/1.1 |
| 143 | Host: {domain} |
| 144 | |
| 145 | """) |
| 146 | assert r.exit_code == 0, f"{r.stdout}{r.stderr}" |
| 147 | lines = r.stdout.split('\n') |
| 148 | rlines = None |
| 149 | for idx, l in enumerate(lines): |
| 150 | if l.startswith('HTTP/'): |
| 151 | rlines = lines[idx:] |
| 152 | assert rlines, f"No response found in: {r.stdout}" |
| 153 | r2 = self.parse_response(rlines) |
| 154 | assert r2.response |
| 155 | assert r2.response['status'] == exp_status |
| 156 | # |
| 157 | env.httpd_error_log.ignore_recent( |
| 158 | lognos = [ |
| 159 | "AH01144" # No protocol handler was valid for the URL |
| 160 | ] |
| 161 | ) |
| 162 | |
| 163 | def parse_response(self, lines) -> ExecResult: |
| 164 | exp_body = False |
nothing calls this directly
no test coverage detected