Files
httrack/tests/proxy-https-server.py
Xavier Roche d100cd42e9 Share the proxy test servers' duplicated code in proxytestlib.py
proxy-https-server.py (#85) and proxy-connect-server.py (#564) were ~90%
identical: the CONNECT proxy, the relay and the origin were copies, with
only the origin body, the TLS wrap and the argv shape differing. Move the
common half into tests/proxytestlib.py; each server is now a docstring
plus a serve() call. socks5-server.py reuses the relay too, but keeps its
own origin, which is specialised for keep-alive reuse and subpages.

The shared origin always logs the request line (it was proxy-connect only);
harmless for #85, which only asserts no Proxy-Authorization reaches it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
2026-07-16 09:41:28 +02:00

1.2 KiB