mirror of
https://github.com/python/cpython.git
synced 2025-08-24 10:45:53 +00:00
#4768: store base64 encoded email body parts as text, not binary.
Patch and tests by Forest Bond.
This commit is contained in:
parent
deda8cb835
commit
7da8f06df0
4 changed files with 10 additions and 4 deletions
|
@ -29,7 +29,7 @@ def encode_base64(msg):
|
|||
Also, add an appropriate Content-Transfer-Encoding header.
|
||||
"""
|
||||
orig = msg.get_payload()
|
||||
encdata = _bencode(orig)
|
||||
encdata = str(_bencode(orig), 'ascii')
|
||||
msg.set_payload(encdata)
|
||||
msg['Content-Transfer-Encoding'] = 'base64'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue