mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
More codestring -> codebytes.
This commit is contained in:
parent
3ed0deb9af
commit
706824f19f
10 changed files with 16 additions and 15 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue