summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_cgi.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2000-09-15 20:06:57 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2000-09-15 20:06:57 (GMT)
commitafde7e24b6c7cd75e1797a02fa6c3674f6419531 (patch)
tree3b402da18d848f153ab6a21ef07f6ab2ece5c20b /Lib/test/test_cgi.py
parentce20967c2c4d1aa1333bcda5a3d8a86587af70b0 (diff)
downloadcpython-afde7e24b6c7cd75e1797a02fa6c3674f6419531.zip
cpython-afde7e24b6c7cd75e1797a02fa6c3674f6419531.tar.gz
cpython-afde7e24b6c7cd75e1797a02fa6c3674f6419531.tar.bz2
fix bug #110661 (PR#356) -- accept either & or ; as separator for CGI
query string also some doc string reformatting and use of string methods instead of older string.splitfields
Diffstat (limited to 'Lib/test/test_cgi.py')
-rw-r--r--Lib/test/test_cgi.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py
index 29eb5a6..de60115 100644
--- a/Lib/test/test_cgi.py
+++ b/Lib/test/test_cgi.py
@@ -58,9 +58,12 @@ parse_test_cases = [
("", ValueError("bad query field: ''")),
("&", ValueError("bad query field: ''")),
("&&", ValueError("bad query field: ''")),
+ (";", ValueError("bad query field: ''")),
+ (";&;", ValueError("bad query field: ''")),
# Should the next few really be valid?
("=", {}),
("=&=", {}),
+ ("=;=", {}),
# This rest seem to make sense
("=a", {'': ['a']}),
("&=a", ValueError("bad query field: ''")),
@@ -75,6 +78,8 @@ parse_test_cases = [
("a=a+b&b=b+c", {'a': ['a b'], 'b': ['b c']}),
("a=a+b&a=b+a", {'a': ['a b', 'b a']}),
("x=1&y=2.0&z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
+ ("x=1;y=2.0&z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
+ ("x=1;y=2.0;z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
("Hbc5161168c542333633315dee1182227:key_store_seqid=400006&cuyer=r&view=bustomer&order_id=0bb2e248638833d48cb7fed300000f1b&expire=964546263&lobale=en-US&kid=130003.300038&ss=env",
{'Hbc5161168c542333633315dee1182227:key_store_seqid': ['400006'],
'cuyer': ['r'],