Message137480
Creating an empty header produces an exception when calling the encode function:
>>> from email.header import Header
>>> Header('', 'iso-8859-1').encode()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.2/email/header.py", line 317, in encode
formatter.feed(lines[0], charset)
IndexError: list index out of range
According to RFC822, empty headers are valid (and are found in the wild anyway), so this should just work.
I've attached a trivial fix that appears to work. |
|
Date |
User |
Action |
Args |
2011-06-02 15:25:14 | ntkoopman | set | recipients:
+ ntkoopman |
2011-06-02 15:25:14 | ntkoopman | set | messageid: <1307028314.79.0.859095515398.issue12241@psf.upfronthosting.co.za> |
2011-06-02 15:25:14 | ntkoopman | link | issue12241 messages |
2011-06-02 15:25:13 | ntkoopman | create | |
|