[issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header

Nicolas Dumazet report at bugs.python.org
Tue Jul 6 11:40:58 CEST 2010


Nicolas Dumazet <nicdumz at gmail.com> added the comment:

Sure, where was my head.

So, a simple patch like this one:

_oldheaderinit = email.Header.Header.__init__
def _unifiedheaderinit(self, *args, **kw):
    # override continuation_ws
    kw['continuation_ws'] = ' '
    _oldheaderinit(self, *args, **kw)
email.Header.Header.__dict__['__init__'] = _unifiedheaderinit


fixes the issue for us, and might be helpful to others.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1974>
_______________________________________


More information about the Python-bugs-list mailing list