From 8ccfb376f34a66dfc591e8ffa0307810f588937c Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 26 Jun 2012 19:56:47 +1200 Subject: [PATCH] Remove -T and -U command-line options. They're redundant convenience options, and we need more space. --- libmproxy/cmdline.py | 18 ++---------------- test/test_cmdline.py | 8 -------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index 3370ebdf7..8d57c7c7b 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 45c0b3e6b..cc1abfa2f 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)