summaryrefslogtreecommitdiffstats
path: root/Lib/urllib/request.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-06-04 09:42:55 (GMT)
committerGeorg Brandl <georg@python.org>2009-06-04 09:42:55 (GMT)
commit706824f19f734e5e567f32d989376547c0ae08da (patch)
tree0cd5ff7ccc373a848f409b572f1bd1ae727fd8fe /Lib/urllib/request.py
parent3ed0deb9af03c3546ebe583c38ccfd0c5e364196 (diff)
downloadcpython-706824f19f734e5e567f32d989376547c0ae08da.zip
cpython-706824f19f734e5e567f32d989376547c0ae08da.tar.gz
cpython-706824f19f734e5e567f32d989376547c0ae08da.tar.bz2
More codestring -> codebytes.
Diffstat (limited to 'Lib/urllib/request.py')
-rw-r--r--Lib/urllib/request.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 89ac22a..bb67267 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -1758,7 +1758,8 @@ class URLopener:
msg.append('Content-type: %s' % type)
if encoding == 'base64':
import base64
- data = base64.decodestring(data)
+ # XXX is this encoding/decoding ok?
+ data = base64.decodebytes(data.encode('ascii')).decode('latin1')
else:
data = unquote(data)
msg.append('Content-Length: %d' % len(data))