aboutsummaryrefslogtreecommitdiffstats
path: root/examples/dup_and_replay.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-02-23 15:43:04 +1300
committerAldo Cortesi <aldo@nullcube.com>2012-02-23 15:43:04 +1300
commit62ca9b71ff940221126bf1189eace9de7c485f5f (patch)
tree64d06e8b6f4f7eb1872603af5947337c56a75200 /examples/dup_and_replay.py
parentbc3bf969bac7f4e7a70324fd1736e20abd4b204d (diff)
downloadmitmproxy-62ca9b71ff940221126bf1189eace9de7c485f5f.tar.gz
mitmproxy-62ca9b71ff940221126bf1189eace9de7c485f5f.tar.bz2
mitmproxy-62ca9b71ff940221126bf1189eace9de7c485f5f.zip
Add two more examples: dup_and_replay.py and modify_querystring.py
Diffstat (limited to 'examples/dup_and_replay.py')
-rw-r--r--examples/dup_and_replay.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/dup_and_replay.py b/examples/dup_and_replay.py
new file mode 100644
index 00000000..9c58d3a4
--- /dev/null
+++ b/examples/dup_and_replay.py
@@ -0,0 +1,4 @@
+def request(ctx, flow):
+ f = ctx.duplicate_flow(flow)
+ f.request.path = "/changed"
+ ctx.replay_request(f)