summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_http_cookies.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-04-22 01:19:04 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2012-04-22 01:19:04 (GMT)
commit3a441c1bedf1091ed4a177e5d7f0a12ef9f9fa65 (patch)
treeaa7845ca2d570c33046a0b6f6b022a48383f49c5 /Lib/test/test_http_cookies.py
parentb8c0206bd4b113ea774554a608057f4ad6ebfabc (diff)
downloadcpython-3a441c1bedf1091ed4a177e5d7f0a12ef9f9fa65.zip
cpython-3a441c1bedf1091ed4a177e5d7f0a12ef9f9fa65.tar.gz
cpython-3a441c1bedf1091ed4a177e5d7f0a12ef9f9fa65.tar.bz2
Fix Issue2193 - Allow ":" character in Cookie NAME values
Diffstat (limited to 'Lib/test/test_http_cookies.py')
-rw-r--r--Lib/test/test_http_cookies.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_http_cookies.py b/Lib/test/test_http_cookies.py
index f9a98c4..a56a42d 100644
--- a/Lib/test/test_http_cookies.py
+++ b/Lib/test/test_http_cookies.py
@@ -34,6 +34,15 @@ class CookieTests(unittest.TestCase):
'dict': {'keebler' : 'E=mc2'},
'repr': "<SimpleCookie: keebler='E=mc2'>",
'output': 'Set-Cookie: keebler=E=mc2'},
+
+ # Cookies with ':' character in their name. Though not mentioned in
+ # RFC, servers / browsers allow it.
+
+ {'data': 'key:term=value:term',
+ 'dict': {'key:term' : 'value:term'},
+ 'repr': "<SimpleCookie: key:term='value:term'>",
+ 'output': 'Set-Cookie: key:term=value:term'},
+
]
for case in cases: