[ python-Bugs-895510 ] email library Parser can't parse some
messages
SourceForge.net
noreply at sourceforge.net
Sun May 9 13:20:16 EDT 2004
Bugs item #895510, was opened at 2004-02-12 02:42
Message generated for change (Comment added) made by bwarsaw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=895510&group_id=5470
Category: Python Library
Group: Python 2.2.3
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: Jan Ondrej (ondrejj)
Assigned to: Barry A. Warsaw (bwarsaw)
Summary: email library Parser can't parse some messages
Initial Comment:
The email library can't decode some emails with one bad
part. This part is ignored (not decoded) by other
software. I am developing an antivir software and I
need to decode these messages.
There is the code, which raises an error:
if line[0] in ' \t':
if not lastheader:
print "Errors.HeaderParseError"
raise Errors.HeaderParseError(
'Continuation line seen before
first header')
There is an example attached. It contains a space
before "Content-Type:" in first part. This part is
buggy, but next part can contain important data.
If it is not a bug but an RFC implementation, please
tell me, how I can decode these emails.
I think, this problem is in all versions of this
library (also in CVS), because this code is not changed
in it.
----------------------------------------------------------------------
>Comment By: Barry A. Warsaw (bwarsaw)
Date: 2004-05-09 13:20
Message:
Logged In: YES
user_id=12800
Sorry, but that's a limitation of the design of the email2
Parser. You should probably have a look at the email3
FeedParser which will parse the sample message, adding
'defects' for the bogus headers.
email3 will be part of Python 2.4. Please join the
email-sig if you want to contribute to the design.
http://www.python.org/sigs/email-sig
----------------------------------------------------------------------
Comment By: Jan Ondrej (ondrejj)
Date: 2004-02-12 02:45
Message:
Logged In: YES
user_id=799485
I am sorry, file was not attached.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=895510&group_id=5470
More information about the Python-bugs-list
mailing list