From 97e534e76b189176bf704098673f33079f68b14a Mon Sep 17 00:00:00 2001 From: Tran Tien Dat Date: Wed, 21 Feb 2018 19:58:29 +0800 Subject: Fix #2829 --- test/mitmproxy/net/http/test_cookies.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'test') diff --git a/test/mitmproxy/net/http/test_cookies.py b/test/mitmproxy/net/http/test_cookies.py index e12b0f00..74233cca 100644 --- a/test/mitmproxy/net/http/test_cookies.py +++ b/test/mitmproxy/net/http/test_cookies.py @@ -142,6 +142,27 @@ def test_cookie_roundtrips(): def test_parse_set_cookie_pairs(): pairs = [ + [ + "=", + [[ + ["", ""] + ]] + ], + [ + "=;foo=bar", + [[ + ["", ""], + ["foo", "bar"] + ]] + ], + [ + "=;=;foo=bar", + [[ + ["", ""], + ["", ""], + ["foo", "bar"] + ]] + ], [ "=uno", [[ -- cgit v1.2.3 From c471c42c7c2b26b4330c7780abe72cc8176580ab Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 23 Feb 2018 13:04:31 +1300 Subject: Fix an issue with quoting and commands Previously, quotes would disappear during editing, making it impossible to enter command arguments with spaces. --- test/mitmproxy/test_command.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') diff --git a/test/mitmproxy/test_command.py b/test/mitmproxy/test_command.py index c777192d..e2b80753 100644 --- a/test/mitmproxy/test_command.py +++ b/test/mitmproxy/test_command.py @@ -211,6 +211,22 @@ class TestCommand: ], [] ], + [ + "flow \"one two", + [ + command.ParseResult(value = "flow", type = mitmproxy.types.Cmd, valid = True), + command.ParseResult(value = "\"one two", type = flow.Flow, valid = False), + ], + ["str"] + ], + [ + "flow \"one two\"", + [ + command.ParseResult(value = "flow", type = mitmproxy.types.Cmd, valid = True), + command.ParseResult(value = "one two", type = flow.Flow, valid = False), + ], + ["str"] + ], ] with taddons.context() as tctx: tctx.master.addons.add(TAddon()) -- cgit v1.2.3