[ python-Bugs-1443866 ] email 3.0+ stops parsing headers prematurely

SourceForge.net noreply at sourceforge.net
Mon Mar 6 05:12:05 CET 2006


Bugs item #1443866, was opened at 2006-03-05 20:10
Message generated for change (Settings changed) made by msapiro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1443866&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Mark Sapiro (msapiro)
>Assigned to: Barry A. Warsaw (bwarsaw)
Summary: email 3.0+ stops parsing headers prematurely

Initial Comment:
given the following input:

Received: by main.example.com; Sun Nov  4 02:45:50 2001
X-From_: postmaster at example.com  Sun Nov  4 02:45:50 2001
>From bob  Sun Nov  4 02:45:50 2001
Return-Path: <postmaster at example.com>
Delivered-To: bob at example.com

followed by more headers and message body, the email
3.0+ parser parses everything beginning with the

>From bob  Sun Nov  4 02:45:50 2001

line as the body of the message with only the first two
lines as the header. RFC 2822 is clear that the message
headers are separated from the body by an empty line,
so I think the parser should continue parsing
everything as headers until an empty line or the end of
input is encountered, and should consider lines such as

>From bob  Sun Nov  4 02:45:50 2001

or

Some arbitrary text

encountered in the headers to be MalformedHeaderDefect.
A complete example message is atteched.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1443866&group_id=5470


More information about the Python-bugs-list mailing list