aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/examples/dup_and_replay.py
diff options
context:
space:
mode:
Diffstat (limited to 'mitmproxy/examples/dup_and_replay.py')
-rw-r--r--mitmproxy/examples/dup_and_replay.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mitmproxy/examples/dup_and_replay.py b/mitmproxy/examples/dup_and_replay.py
new file mode 100644
index 00000000..9ba91d3b
--- /dev/null
+++ b/mitmproxy/examples/dup_and_replay.py
@@ -0,0 +1,4 @@
+def request(context, flow):
+ f = context.duplicate_flow(flow)
+ f.request.path = "/changed"
+ context.replay_request(f)