]> granicus.if.org Git - python/commit
Anthony Baxter's patch for non-strict parsing. This adds a `strict'
authorBarry Warsaw <barry@python.org>
Tue, 9 Jul 2002 02:50:02 +0000 (02:50 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 9 Jul 2002 02:50:02 +0000 (02:50 +0000)
commitf6caeba03a59944602f7c0eec69c9f275f9608eb
treec3eebc52d19f95f0286af48b34f9f23c0cafa57a
parenta0c8b9d4d5fda80f82553ed91b341a531a846ab6
Anthony Baxter's patch for non-strict parsing.  This adds a `strict'
argument to the constructor -- defaulting to true -- which is
different than Anthony's approach of using global state.

parse(), parsestr(): Grow a `headersonly' argument which stops parsing
once the header block has been seen, i.e. it does /not/ parse or even
read the body of the message.  This is used for parsing message/rfc822
type messages.

We need test cases for the non-strict parsing.  Anthony will supply
these.

_parsebody(): We can get rid of the isdigest end-of-line kludges,
although we still need to know if we're parsing a multipart/digest so
we can set the default type accordingly.
Lib/email/Parser.py