-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Closed as not planned
Closed as not planned
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-emailtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
This code
import email
msg = email.message_from_bytes(b"""To: [email protected]
From: "Txxxxxx Mxxxxxxx de Vxxxxxx, Fxxxxxxxx" <[email protected]>
body
""")creates a message object which when flattened as bytes erroneously folds the long From: header following the comma inside the quoted string.
msg.as_bytes()
b'To: [email protected]\nFrom: "Txxxxxx Mxxxxxxx de Vxxxxxx,\n Fxxxxxxxx" <[email protected]>\n\nbody\n'
CPython versions tested on:
3.9, 3.11
Operating systems tested on:
Linux
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-emailtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error