diff options
author | Guido van Rossum <guido@python.org> | 2008-08-18 21:44:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2008-08-18 21:44:30 (GMT) |
commit | 52dbbb906804f36067ecbc8c89a00cdab545bdb2 (patch) | |
tree | 1b923b821dc0547f6fa3e30401c7dac177a8f557 /Lib/test/test_http_cookiejar.py | |
parent | 4171da5c9d899dc64cb15f177f05b9de05563148 (diff) | |
download | cpython-52dbbb906804f36067ecbc8c89a00cdab545bdb2.zip cpython-52dbbb906804f36067ecbc8c89a00cdab545bdb2.tar.gz cpython-52dbbb906804f36067ecbc8c89a00cdab545bdb2.tar.bz2 |
- Issue #3300: make urllib.parse.[un]quote() default to UTF-8.
Code contributed by Matt Giuca. quote() now encodes the input
before quoting, unquote() decodes after unquoting. There are
new arguments to change the encoding and errors settings.
There are also new APIs to skip the encode/decode steps.
[un]quote_plus() are also affected.
Diffstat (limited to 'Lib/test/test_http_cookiejar.py')
-rw-r--r-- | Lib/test/test_http_cookiejar.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_http_cookiejar.py b/Lib/test/test_http_cookiejar.py index 1627923..a97c6fa 100644 --- a/Lib/test/test_http_cookiejar.py +++ b/Lib/test/test_http_cookiejar.py @@ -539,6 +539,8 @@ class CookieTests(TestCase): # unquoted unsafe ("/foo\031/bar", "/foo%19/bar"), ("/\175foo/bar", "/%7Dfoo/bar"), + # unicode, latin-1 range + ("/foo/bar\u00fc", "/foo/bar%C3%BC"), # UTF-8 encoded # unicode ("/foo/bar\uabcd", "/foo/bar%EA%AF%8D"), # UTF-8 encoded ] @@ -1444,7 +1446,8 @@ class LWPCookieTests(TestCase): # Try some URL encodings of the PATHs. # (the behaviour here has changed from libwww-perl) c = CookieJar(DefaultCookiePolicy(rfc2965=True)) - interact_2965(c, "http://www.acme.com/foo%2f%25/%3c%3c%0Anew%E5/%E5", + interact_2965(c, "http://www.acme.com/foo%2f%25/" + "%3c%3c%0Anew%C3%A5/%C3%A5", "foo = bar; version = 1") cookie = interact_2965( |