mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
#14925: email now registers a defect for missing header/body separator.
This patch also deprecates the MalformedHeaderDefect. My best guess is that this defect was rendered obsolete by a refactoring of the parser, and the corresponding defect for the new parser (which this patch introduces) was overlooked.
This commit is contained in:
parent
2c172d04bb
commit
adbdcdbd95
6 changed files with 61 additions and 18 deletions
|
|
@ -48,8 +48,10 @@ class FirstHeaderLineIsContinuationDefect(MessageDefect):
|
|||
class MisplacedEnvelopeHeaderDefect(MessageDefect):
|
||||
"""A 'Unix-from' header was found in the middle of a header block."""
|
||||
|
||||
class MalformedHeaderDefect(MessageDefect):
|
||||
"""Found a header that was missing a colon, or was otherwise malformed."""
|
||||
class MissingHeaderBodySeparatorDefect(MessageDefect):
|
||||
"""Found line with no leading whitespace and no colon before blank line."""
|
||||
# XXX: backward compatibility, just in case (it was never emitted).
|
||||
MalformedHeaderDefect = MissingHeaderBodySeparatorDefect
|
||||
|
||||
class MultipartInvariantViolationDefect(MessageDefect):
|
||||
"""A message claimed to be a multipart but no subparts were found."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue