New submission from Sophonet <pythonbugtrac...@kant.sophonet.de>:
For an activity with fastapi, I am preparing a Response object with the content of a email.mime.multipart MIMEMultipart object. Adhering to the standards (RFC), a MIMEMultipart response uses CRLF line endings (policy=HTTP). However, the binary attachment I am adding with MIMEApplication() and multipart.attach() in that case gets corrupted since all bytes corresponding to newlines (LF) are replaces with CRLF. Am I doing something wrong or is this a bug that needs to be fixed? What I would like to achieve is building a RFC-compliant MIMEMultipart payload in which the subparts do not get altered (in case of application/octet-stream). Thanks, Sophonet ---------- components: email messages: 409041 nosy: barry, r.david.murray, sophonet priority: normal severity: normal status: open title: MIMEMultipart enforces line endings also for binary subparts type: behavior versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46154> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com