mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Test: fix a bug in arg processing for the proxy server
Fixes a typo in arg processing for test script proxy2.py. Also removes an outdated comment and clarifies another. Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
This commit is contained in:
parent
2b019f65f7
commit
7288b71917
2 changed files with 2 additions and 6 deletions
|
|
@ -61,7 +61,7 @@ def get_cert_filepath(path):
|
|||
|
||||
|
||||
class ThreadingHTTPServer(ThreadingMixIn, HTTPServer):
|
||||
address_family = socket.AF_INET # MODIFIED
|
||||
address_family = socket.AF_INET # MODIFIED to use IPv4 instead of IPv6
|
||||
daemon_threads = True
|
||||
|
||||
def handle_error(self, request, client_address):
|
||||
|
|
@ -421,7 +421,7 @@ def test(HandlerClass=ProxyRequestHandler, ServerClass=ThreadingHTTPServer, prot
|
|||
server_address = ('127.0.0.1', port) # MODIFIED: changed from '::1'
|
||||
|
||||
# MODIFIED: Conditional below added to control INTERCEPT setting.
|
||||
if len(sys.argv > 2):
|
||||
if len(sys.argv) > 2:
|
||||
if sys.argv[2].lower() == 'intercept':
|
||||
global INTERCEPT
|
||||
INTERCEPT = True
|
||||
|
|
|
|||
|
|
@ -282,10 +282,6 @@ def test_httpS_dl_via_smart_http_proxy(self):
|
|||
Note that the proxy address is still http://... even though the connection
|
||||
with the target server is an HTTPS connection. The proxy itself will act as
|
||||
a TCP proxy via HTTP CONNECT.
|
||||
|
||||
TEMPORARY NOTE: It turns out that mitmproxy doesn't support HTTP CONNECT,
|
||||
so I need a new proxy option for this....
|
||||
|
||||
"""
|
||||
self.set_env_value('HTTP_PROXY', self.http_proxy_addr2) # http as intended
|
||||
self.set_env_value('HTTPS_PROXY', self.http_proxy_addr2) # http as intended
|
||||
|
|
|
|||
Loading…
Reference in a new issue