aboutsummaryrefslogtreecommitdiffstats
path: root/examples/dup_and_replay.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-07-15 23:17:57 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-07-15 23:17:57 -0700
commit3602fd7a36d963311339ab11ed36ff00df860f71 (patch)
tree5834a98b35c02639c876544bc645f205068fac99 /examples/dup_and_replay.py
parenta3c7c84d49c3e6563e7f37ef60c989f99ed96788 (diff)
parent17305643bc482c0b185eec5c64d506790cd26587 (diff)
downloadmitmproxy-3602fd7a36d963311339ab11ed36ff00df860f71.tar.gz
mitmproxy-3602fd7a36d963311339ab11ed36ff00df860f71.tar.bz2
mitmproxy-3602fd7a36d963311339ab11ed36ff00df860f71.zip
Merge remote-tracking branch 'origin/master' into message-body-encoding
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)