aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2018-01-11 09:01:51 +0800
committerMatthew Shao <me@matshao.com>2018-01-11 09:01:51 +0800
commit0a72911f7cc9b735df7928335b573e5dee047506 (patch)
treedcd6089f264588bae22799275c3a305a6ed7daf4
parent67300fab3119f055a6cbb43b7cbc9d33e849d165 (diff)
downloadmitmproxy-0a72911f7cc9b735df7928335b573e5dee047506.tar.gz
mitmproxy-0a72911f7cc9b735df7928335b573e5dee047506.tar.bz2
mitmproxy-0a72911f7cc9b735df7928335b573e5dee047506.zip
Fix #2766.
-rw-r--r--mitmproxy/addons/clientplayback.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mitmproxy/addons/clientplayback.py b/mitmproxy/addons/clientplayback.py
index 3fd96669..2dd488b9 100644
--- a/mitmproxy/addons/clientplayback.py
+++ b/mitmproxy/addons/clientplayback.py
@@ -35,6 +35,9 @@ class ClientPlayback:
"""
Replay requests from flows.
"""
+ for f in flows:
+ if f.live:
+ raise exceptions.CommandError("Can't replay live flow.")
self.flows = list(flows)
ctx.log.alert("Replaying %s flows." % len(self.flows))
ctx.master.addons.trigger("update", [])