From 706824f19f734e5e567f32d989376547c0ae08da Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 4 Jun 2009 09:42:55 +0000 Subject: More codestring -> codebytes. --- Lib/urllib/request.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Lib/urllib/request.py') diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 89ac22a8f1..bb67267639 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)) -- cgit v1.2.1