aboutsummaryrefslogtreecommitdiffstats
path: root/examples/dup_and_replay.py
diff options
context:
space:
mode:
authorClemens <cle1000.cb@gmail.com>2016-07-19 12:32:36 +0200
committerClemens <cle1000.cb@gmail.com>2016-07-19 12:32:36 +0200
commit698fb11132598a38851383f805dde5ca4d2a046d (patch)
tree95fc0184735722ccd6e4697f884496d6852e13f6 /examples/dup_and_replay.py
parent48728af43ad746d70ef3e251dc28b75028dea1e6 (diff)
parent18dd84b9081fb5552d5b5b2560405496445e2110 (diff)
downloadmitmproxy-698fb11132598a38851383f805dde5ca4d2a046d.tar.gz
mitmproxy-698fb11132598a38851383f805dde5ca4d2a046d.tar.bz2
mitmproxy-698fb11132598a38851383f805dde5ca4d2a046d.zip
Merge remote-tracking branch 'origin/master' into flow_editing
Diffstat (limited to 'examples/dup_and_replay.py')
-rw-r--r--examples/dup_and_replay.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/dup_and_replay.py b/examples/dup_and_replay.py
index 9ba91d3b..b47bf951 100644
--- a/examples/dup_and_replay.py
+++ b/examples/dup_and_replay.py
@@ -1,4 +1,7 @@
-def request(context, flow):
- f = context.duplicate_flow(flow)
+from mitmproxy import master
+
+
+def request(flow):
+ f = master.duplicate_flow(flow)
f.request.path = "/changed"
- context.replay_request(f)
+ master.replay_request(f, block=True, run_scripthooks=False)