[issue8132] email.header.decode_header makes mistakes

R. David Murray report at bugs.python.org
Sun Mar 14 03:49:17 CET 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

Per the RFC, this is the correct behavior.  An encoded word *must* begin and end either at the field boundary or with whitespace.  So ...?=Arobase, with no whitespace between the = and Arobase, makes your first example into an invalid encoded word, and thus it is returned as if it were plain ASCII.

One could argue that email could be smarter and interpret this string as an encoded word anyway, following the Postel principle (be generous in what you accept), but it currently does not do so, and not doing so is not a bug.

email6 will handle such non-RFC compliant examples better, if all goes well.

----------
nosy: +r.david.murray
priority:  -> normal
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

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


More information about the Python-bugs-list mailing list