aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/flow.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-03-09 13:15:31 +1300
committerAldo Cortesi <aldo@nullcube.com>2011-03-09 13:15:31 +1300
commit03f13453856e3af15dc3af81adcf3a80d1358da0 (patch)
treef4700518429e2264ee083034f2b91aa7425ce5e8 /libmproxy/flow.py
parent592812467da5bfe8196f16dcfa6d348551c4febd (diff)
downloadmitmproxy-03f13453856e3af15dc3af81adcf3a80d1358da0.tar.gz
mitmproxy-03f13453856e3af15dc3af81adcf3a80d1358da0.tar.bz2
mitmproxy-03f13453856e3af15dc3af81adcf3a80d1358da0.zip
Add an --anticache option to mitmdump.
This removes all headers that might cause a server to return 304-not-modified. For now, all the new features are going into mitmdump - everything will be ported over to mitmproxy once I have the feature set locked down.
Diffstat (limited to 'libmproxy/flow.py')
-rw-r--r--libmproxy/flow.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmproxy/flow.py b/libmproxy/flow.py
index dff58fa0..0080f1d4 100644
--- a/libmproxy/flow.py
+++ b/libmproxy/flow.py
@@ -432,6 +432,7 @@ class FlowMaster(controller.Master):
self.scripts = {}
self.kill_nonreplay = False
self.stickycookie_state = False
+ self.anticache = False
def _runscript(self, f, script):
#begin nocover
@@ -521,6 +522,8 @@ class FlowMaster(controller.Master):
self.stickycookie_state.handle_request(f)
if "request" in self.scripts:
self._runscript(f, self.scripts["request"])
+ if self.anticache:
+ r.anticache()
if self.server_playback:
pb = self.do_server_playback(f)
if not pb: