[issue35863] email.headers wraps headers badly

Jon Ribbens report at bugs.python.org
Fri Feb 1 08:22:32 EST 2019


Jon Ribbens <jribbens at gmail.com> added the comment:

I did read the RFCs. I suspect the [CFWS] in the msg-id is for the benefit of the references production which contains a list of msg-ids. The 78-character suggested line length limit is explicitly noted as being for display purposes, and therefore is of little application to headers which are not displayed in user interfaces.

Also consider that the Python wrapping code produces "\n ..." when given a header that is 80 indivisible characters long, when there is no possibility of avoiding a line over 78 characters.

Outlook seems to cope alright with other headers (I tried From and Subject) being wrapped like this; I shudder to think what their code must be like in order to produce this bug.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35863>
_______________________________________


More information about the Python-bugs-list mailing list