Issue1752723
Created on 2007-07-12 15:52 by dwebster99, last changed 2007-07-13 21:22 by barry.
| File name |
Uploaded |
Description |
Edit |
Remove |
|
email_tests.py
|
dwebster99,
2007-07-12 15:52
|
message_from_string bug |
|
|
|
msg32484 - (view) |
Author: David Webster (dwebster99) |
Date: 2007-07-12 15:52 |
|
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
|
|
msg32485 - (view) |
Author: Neal Norwitz (nnorwitz) |
Date: 2007-07-13 03:48 |
|
Barry, could you take a look? Thanks.
|
|
msg32486 - (view) |
Author: Barry A. Warsaw (barry) |
Date: 2007-07-13 21:22 |
|
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'.
|
|
| Date |
User |
Action |
Args |
| 2007-07-12 15:52:52 | dwebster99 | create | |
|