[Python-bugs-list] [ python-Bugs-679827 ] Header loses lines, formats strangely

SourceForge.net noreply@sourceforge.net
Mon, 03 Feb 2003 14:06:15 -0800


Bugs item #679827, was opened at 2003-02-03 16:36
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=679827&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Stone (mbrierst)
>Assigned to: Barry A. Warsaw (bwarsaw)
Summary: Header loses lines, formats strangely

Initial Comment:

Biggest problem:
print email.message_from_string("""header: problems
\tthis line is lost
\tthis is not""")

This was caused by revision 1.11 of Header.py which was in response to bug #601392.  The bugs notes show that when this change was checked in, side effects were worried about, and this is it.

Besides this problem, Header does strange and inconsistent formatting of header strings when breaking lines.  Tabs are not consistently taken to be 8 spaces when splitting lines (sometimes they are, sometimes not), and a different module (quopriMIME) handles UN-breaking lines (in the _max_append routine) causing strange formatting.

quopriMIME doesn't deal with the max line length quite correctly and in header_encode ignores leading spaces when calculating line length (maybe this is on purpose?)

All of these issues probably relate somewhat to the discussion in bug #594893 about how to deal with header lines.  Some of this may be related to bug #675420 as well.

I have worked a bit on a patch, and could finish it if someone wants to see it, but I would have to ask some questions about how lines should be broken and unbroken (how to deal with whitespace and such) first.

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

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