Bugs item #1752723, was opened at 2007-07-12 11:52 Message generated for change (Comment added) made by bwarsaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1752723&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.5 >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: David Webster (dwebster99) Assigned to: Barry A. Warsaw (bwarsaw) Summary: email.message_from_string: initial line gets discarded Initial Comment: If the first line of the string passed to email.message_from_string starts with whitespace, the line gets discarded. I believe the problem is in the feed parser, but I don't have a test case to prove that. The attached file is a short program to illustrate the problem. When I run it I get the output shown below. The line count should be unchanged in both cases. leading whitespace : Body changed: lines in: 3 lines out: 2 left justified : Line count was preserved. Platform: Python 2.5.1 Windows 2000 SP4 ---------------------------------------------------------------------- >Comment By: Barry A. Warsaw (bwarsaw) Date: 2007-07-13 17:22 Message: Logged In: YES user_id=12800 Originator: NO It is not legal for the first line of text to start with whitespace. This makes it look like the message begins with a header continuation. The first line isn't lost, it's tucked away on the resulting message's defect list. Try printing 'msg.defects[0].line'. ---------------------------------------------------------------------- Comment By: Neal Norwitz (nnorwitz) Date: 2007-07-12 23:48 Message: Logged In: YES user_id=33168 Originator: NO Barry, could you take a look? Thanks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1752723&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com