[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

R. David Murray report at bugs.python.org
Thu Mar 17 15:38:09 CET 2011


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

If the message contains 8bit bytes in a header, then getitem is going to return a Header object.  decode_header does not operate on Header objects, as you have observed.  Thinking about it some more, having decode_header operate on a Header and return its chunks is a decent binary interface for Header.  This is right on the borderline between a feature and a bug fix, but given that getitem returning Header after a parse is a new feature in 3.2, I think I'm going to treat it as a bug that decode_header doesn't handle that case.

----------
stage: test needed -> needs patch
title: email/header.py: missing str()ification, and bogus encode()s -> email.decode_header fails if msg.__getitem__ returns  Header object

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


More information about the Python-bugs-list mailing list