ietf-tools / mailarchive

IETF Mail List Archives
https://mailarchive.ietf.org
BSD 3-Clause "New" or "Revised" License
40 stars 25 forks source link

Message not decoded properly #3273

Closed ietf-svn-bot closed 1 year ago

ietf-svn-bot commented 3 years ago

owner:rcross@amsl.com type_defect | by rcross@amsl.com


Example: https://mailarchive.ietf.org/arch/msg/srcomp/M3oBKpYOiFixe4vNCMIjA3do_yM/


Issue migrated from trac:3273 at 2022-03-03 15:03:51 +0000

ietf-svn-bot commented 3 years ago

@rcross@amsl.com commented


It looks like this is caused by a trailing space in the message parts Content-Transfer-Encoding header. The msg._headers are: [('Content-Type', 'text/plain;\n\tcharset="UTF-8"'), ('Content-Transfer-Encoding', 'base64 ')]

Note the trailing space. In this scenario msg.get_payload(decode=True) still returns base64. When the trailing space is removed from the header value in the source message file the payload renders properly as ASCII.

rpcross commented 1 year ago

Duplicate of #3515. Closed in commit c8e7e730f74b941dce0aefa843122f6c83ac2859