aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/cmdline.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-07-15 15:21:04 +1200
committerAldo Cortesi <aldo@nullcube.com>2011-07-15 15:24:56 +1200
commit76b4c6ba82f9a1d6411710c82c67cf264d3bb1d3 (patch)
treea17515f8f829136cfd0da5187b2139dede4c43c5 /libmproxy/cmdline.py
parent1a963b91bb61db8fa2bf5df82768a39e97a6cc90 (diff)
downloadmitmproxy-76b4c6ba82f9a1d6411710c82c67cf264d3bb1d3.tar.gz
mitmproxy-76b4c6ba82f9a1d6411710c82c67cf264d3bb1d3.tar.bz2
mitmproxy-76b4c6ba82f9a1d6411710c82c67cf264d3bb1d3.zip
Introduce an anti-compression command-line argument.
This is on by default, which means we avoid compressed content unless the -z flag is specified.
Diffstat (limited to 'libmproxy/cmdline.py')
-rw-r--r--libmproxy/cmdline.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py
index df77f9d0..e3e6ef4e 100644
--- a/libmproxy/cmdline.py
+++ b/libmproxy/cmdline.py
@@ -16,6 +16,7 @@ def get_common_options(options):
return dict(
anticache = options.anticache,
+ anticomp = options.anticomp,
client_replay = options.client_replay,
kill = options.kill,
no_server = options.no_server,
@@ -108,6 +109,12 @@ def common_options(parser):
action="store", dest="wfile", default=None,
help="Write flows to file."
)
+ parser.add_option(
+ "-z",
+ action="store_false", dest="anticomp", default=True,
+ help="Try to convince servers to send us un-compressed data."
+ )
+
group = optparse.OptionGroup(parser, "Client Replay")
group.add_option(
"-c",