Is this a mimetools/rfc822 bug?
Sheila King
sheila at spamcop.net
Mon Jun 25 15:45:17 EDT 2001
On Tue, 26 Jun 2001 03:09:16 +0800, "Andy" <andy at mindgate.net> wrote in
comp.lang.python in article
<L%LZ6.49263$Mq.1975264 at e420r-sjo3.usenetserver.com>:
:works fine. But when there are leading newlines in samplemsg, it can't read
:the headers anymore. (Of course, you can always use lstrip... but it took
:me a while before I found out - not a typical Python experience...)
So far as I know, leading newline characters are not allowed in the
header. A newline character indicates the end of the headers.
If you have a continuation line (a header that wraps and continues onto
a second line) the leading character should be either a single space, or
a horizontal tab character.
Each header is terminated by a newline character, which is followed
either by the name of another header field (on the next line), or a
space or tab, in the event of a continuation line. Else, if followed by
another newline character, this indicates the end of the headers and the
message body follows next.
I studied the RFCs recently, and I think this is what it said?
--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/
More information about the Python-list
mailing list