diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-04-15 10:28:17 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-04-15 10:28:17 +1200 |
commit | 0c85c72dc43d0d017e2bf5af9c2def46968d0499 (patch) | |
tree | ab361a7c2972e666f9e565c02bc83a9348bec7aa /test/test_http_cookies.py | |
parent | aeebf31927eb3ff74824525005c7b146024de6d5 (diff) | |
download | mitmproxy-0c85c72dc43d0d017e2bf5af9c2def46968d0499.tar.gz mitmproxy-0c85c72dc43d0d017e2bf5af9c2def46968d0499.tar.bz2 mitmproxy-0c85c72dc43d0d017e2bf5af9c2def46968d0499.zip |
ODict improvements
- Setting values now tries to preserve the existing order, rather than
just appending to the end.
- __repr__ now returns a repr of the tuple list. The old repr becomes a
.format() method. This is clearer, makes troubleshooting easier, and
doesn't assume all data in ODicts are header-like
Diffstat (limited to 'test/test_http_cookies.py')
-rw-r--r-- | test/test_http_cookies.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/test/test_http_cookies.py b/test/test_http_cookies.py index ad509254..7438af7c 100644 --- a/test/test_http_cookies.py +++ b/test/test_http_cookies.py @@ -135,18 +135,6 @@ def test_cookie_roundtrips(): nose.tools.eq_(ret.lst, lst) -# TODO -# I've seen the following pathological cookie in the wild: -# -# cid=09,0,0,0,0; expires=Wed, 10-Jun-2015 21:54:53 GMT; path=/ -# -# It's not compliant under any RFC - the latest RFC prohibits commas in cookie -# values completely, earlier RFCs require them to be within a quoted string. -# -# If we ditch support for earlier RFCs, we can handle this correctly. This -# leaves us with the question: what's more common, multiple-value Set-Cookie -# headers, or Set-Cookie headers that violate the standards? - def test_parse_set_cookie_pairs(): pairs = [ [ @@ -206,6 +194,9 @@ def test_parse_set_cookie_header(): "", None ], [ + ";", None + ], + [ "one=uno", ("one", "uno", []) ], |