diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-05-23 15:40:47 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-05-23 15:40:47 (GMT) |
commit | c4ae86e47730a4466a8d6ebae4c5531bf1dfca3b (patch) | |
tree | 4c5858a4ef5af5a5e9070ce3b0127c7f6e92e98e /Lib/test/test_http_cookies.py | |
parent | 7bf0d5a759fb60170f305e0a4f3a5ad9c0882e67 (diff) | |
parent | d504f20e1c30d7ee328e897e1bb93cba3d1db7a2 (diff) | |
download | cpython-c4ae86e47730a4466a8d6ebae4c5531bf1dfca3b.zip cpython-c4ae86e47730a4466a8d6ebae4c5531bf1dfca3b.tar.gz cpython-c4ae86e47730a4466a8d6ebae4c5531bf1dfca3b.tar.bz2 |
merge 3.3 (#22931)
Diffstat (limited to 'Lib/test/test_http_cookies.py')
-rw-r--r-- | Lib/test/test_http_cookies.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_http_cookies.py b/Lib/test/test_http_cookies.py index e984252..c7b680b 100644 --- a/Lib/test/test_http_cookies.py +++ b/Lib/test/test_http_cookies.py @@ -43,6 +43,19 @@ class CookieTests(unittest.TestCase): 'repr': "<SimpleCookie: key:term='value:term'>", 'output': 'Set-Cookie: key:term=value:term'}, + # issue22931 - Adding '[' and ']' as valid characters in cookie + # values as defined in RFC 6265 + { + 'data': 'a=b; c=[; d=r; f=h', + 'dict': {'a':'b', 'c':'[', 'd':'r', 'f':'h'}, + 'repr': "<SimpleCookie: a='b' c='[' d='r' f='h'>", + 'output': '\n'.join(( + 'Set-Cookie: a=b', + 'Set-Cookie: c=[', + 'Set-Cookie: d=r', + 'Set-Cookie: f=h' + )) + } ] for case in cases: |