aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/change_upstream_proxy.py4
-rw-r--r--libmproxy/flow.py3
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/change_upstream_proxy.py b/examples/change_upstream_proxy.py
index e063ca4f..74a43bd0 100644
--- a/examples/change_upstream_proxy.py
+++ b/examples/change_upstream_proxy.py
@@ -1,7 +1,7 @@
-# This scripts demonstrates how mitmproxy can switch to a different upstream proxy
+# This scripts demonstrates how mitmproxy can switch to a second/different upstream proxy
# in upstream proxy mode.
#
-# Usage: mitmdump -s "change_upstream_proxy.py host"
+# Usage: mitmdump -U http://default-upstream-proxy.local:8080/ -s "change_upstream_proxy.py host"
from libmproxy.protocol.http import send_connect_request
alternative_upstream_proxy = ("localhost", 8082)
diff --git a/libmproxy/flow.py b/libmproxy/flow.py
index bd35e864..1826af3d 100644
--- a/libmproxy/flow.py
+++ b/libmproxy/flow.py
@@ -192,6 +192,7 @@ class ClientPlaybackState:
"""
if self.flows and not self.current:
n = self.flows.pop(0)
+ n.response = None
n.reply = controller.DummyReply()
self.current = master.handle_request(n)
if not testing and not self.current.response:
@@ -615,7 +616,7 @@ class FlowMaster(controller.Master):
]
if all(e):
self.shutdown()
- self.client_playback.tick(self, timeout)
+ self.client_playback.tick(self)
return controller.Master.tick(self, q, timeout)