classification
Title: email parsing - Rare Failure
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: email parser incorrectly breaks headers with a CRLF at 8192
View: 1555570
Assigned To: barry Nosy List: WinstonEwert, amaury.forgeotdarc, barry
Priority: normal Keywords:

Created on 2009-05-31 05:14 by WinstonEwert, last changed 2009-06-02 09:16 by amaury.forgeotdarc. This issue is now closed.

Messages (2)
msg88593 - (view) Author: Winston Ewert (WinstonEwert) Date: 2009-05-31 05:14
I was using email.message_from_string which eventually feeds block of
8192 bytes into the actual e-mail parsing code. However, in my case one
the blocks split the \r\n at the end of a submessage. This caused the
code to identify it as two newlines and thus the submessage headers were
interpreted as being content.

For my purposes I've changed:
NLCRE_crack = re.compile('(\r\n|\r|\n)')
to
NLCRE_crack = re.compile('(\r\n)')

Which prevents the problem.

I suspect that is not a good fix but I do not know the standard well
enough to know what would be a good fix.
msg88730 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-06-02 09:16
This is a duplicate of issue1555570.
History
Date User Action Args
2009-06-02 09:16:44amaury.forgeotdarcsetstatus: open -> closed

nosy: + amaury.forgeotdarc
messages: + msg88730

superseder: email parser incorrectly breaks headers with a CRLF at 8192
resolution: duplicate
2009-05-31 18:22:05pitrousetassignee: barry

nosy: + barry
2009-05-31 05:14:42WinstonEwertcreate