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.6718708004153358...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue28463> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com