New submission from Jon Ribbens <jribb...@gmail.com>:
email.headers can wrap headers by putting a FWS as the very first thing in the output: >>> from email.header import Header >>> Header("a" * 67, header_name="Content-ID").encode() '\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' i.e. it produces headers that look like this: Content-ID: blah It is unclear to me whether this is compliant with the spec, but there seems to be little reason to do this, and good reason not to in that at the very least Outlook does not understand such headers. (e.g. if you have an HTML email with an inline image referenced by Content-ID then Outlook will not find it if the Content-ID header is wrapped as above.) ---------- components: Library (Lib) messages: 334594 nosy: jribbens priority: normal severity: normal status: open title: email.headers wraps headers badly versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35863> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com