hassanakbar4 / mailarchive-tickets

0 stars 0 forks source link

Message not decoded properly #327

Open hassanakbar4 opened 3 years ago

hassanakbar4 commented 3 years ago

component_MailArchive: User Interface type_defect | by rcross@amsl.com


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


Issue migrated from trac:3273 at 2021-09-22 16:58:28 +0500

hassanakbar4 commented 3 years ago

@hassanakbar4 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.