aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-26 19:56:47 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-26 19:57:59 +1200
commit8ccfb376f34a66dfc591e8ffa0307810f588937c (patch)
treea651a058b85690e0fe6bffc8f6f9925f31f7d33f
parent015a74fd14c6b7ac27a5427c5933987e2ab92bcf (diff)
downloadmitmproxy-8ccfb376f34a66dfc591e8ffa0307810f588937c.tar.gz
mitmproxy-8ccfb376f34a66dfc591e8ffa0307810f588937c.tar.bz2
mitmproxy-8ccfb376f34a66dfc591e8ffa0307810f588937c.zip
Remove -T and -U command-line options.
They're redundant convenience options, and we need more space.
-rw-r--r--libmproxy/cmdline.py18
-rw-r--r--test/test_cmdline.py8
2 files changed, 2 insertions, 24 deletions
diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py
index 3370ebdf..8d57c7c7 100644
--- a/libmproxy/cmdline.py
+++ b/libmproxy/cmdline.py
@@ -73,14 +73,10 @@ def parse_replace_hook(s):
def get_common_options(options):
stickycookie, stickyauth = None, None
- if options.stickycookie_all:
- stickycookie = ".*"
- elif options.stickycookie_filt:
+ if options.stickycookie_filt:
stickycookie = options.stickycookie_filt
- if options.stickyauth_all:
- stickyauth = ".*"
- elif options.stickyauth_filt:
+ if options.stickyauth_filt:
stickyauth = options.stickyauth_filt
reps = []
@@ -175,21 +171,11 @@ def common_options(parser):
)
parser.add_option(
"-t",
- action="store_true", dest="stickycookie_all", default=None,
- help="Set sticky cookie for all requests."
- )
- parser.add_option(
- "-T",
action="store", dest="stickycookie_filt", default=None, metavar="FILTER",
help="Set sticky cookie filter. Matched against requests."
)
parser.add_option(
"-u",
- action="store_true", dest="stickyauth_all", default=None,
- help="Set sticky auth for all requests."
- )
- parser.add_option(
- "-U",
action="store", dest="stickyauth_filt", default=None, metavar="FILTER",
help="Set sticky auth filter. Matched against requests."
)
diff --git a/test/test_cmdline.py b/test/test_cmdline.py
index 45c0b3e6..cc1abfa2 100644
--- a/test/test_cmdline.py
+++ b/test/test_cmdline.py
@@ -41,14 +41,6 @@ def test_common():
assert cmdline.get_common_options(opts)
- opts.stickycookie_all = True
- opts.stickyauth_all = True
- v = cmdline.get_common_options(opts)
- assert v["stickycookie"] == ".*"
- assert v["stickyauth"] == ".*"
-
- opts.stickycookie_all = False
- opts.stickyauth_all = False
opts.stickycookie_filt = "foo"
opts.stickyauth_filt = "foo"
v = cmdline.get_common_options(opts)