From 6fcd1895bb366c8c14eee28c5bdb097680fcfb15 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 26 Jul 2017 12:56:26 +0200 Subject: add comment explaining upstream connect logic --- mitmproxy/proxy/protocol/http.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mitmproxy/proxy/protocol/http.py b/mitmproxy/proxy/protocol/http.py index 728c2ba1..a366861d 100644 --- a/mitmproxy/proxy/protocol/http.py +++ b/mitmproxy/proxy/protocol/http.py @@ -217,6 +217,8 @@ class HttpLayer(base.Layer): return False def handle_upstream_connect(self, f): + # if the user specifies a response in the http_connect hook, we do not connect upstream here. + # https://github.com/mitmproxy/mitmproxy/pull/2473 if not f.response: self.establish_server_connection( f.request.host, -- cgit v1.2.3