[New-bugs-announce] [issue28463] Email long headers parsing/serialization

Константин Волков report at bugs.python.org
Mon Oct 17 13:08:59 EDT 2016


New submission from Константин Волков:

There is strange thing with long headers serialized, they have \n prefix. Example fails on Python3.4/3.5:

from email.message import Message
from email import message_from_bytes

x = '<147672320775.19544.6718708004153358411 at mkren-spb.root.devdomain.local>'
header = 'Message-ID'
msg = Message()
msg[header] = x

data = msg.as_bytes()

msg2 = message_from_bytes(data)
print(x)
print(msg2[header])
assert msg2[header] == x


MessageID was generated by email.utils.make_msgid function.

----------
components: email
messages: 278820
nosy: barry, r.david.murray, Константин Волков
priority: normal
severity: normal
status: open
title: Email long headers parsing/serialization
versions: Python 3.4, Python 3.5

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


More information about the New-bugs-announce mailing list