diff options
| author | htsedebenham <31847376+htsedebenham@users.noreply.github.com> | 2023-07-23 10:25:18 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-23 10:25:18 (GMT) |
| commit | c65592c4d6d7552fb6284442906a96a6874cb266 (patch) | |
| tree | 3c76c93aa4aac7e57bd4266731d3e217d72768d1 /Lib/email/feedparser.py | |
| parent | 54632528eeba841e4a8cc95ecbd84c9aca8eef57 (diff) | |
| download | cpython-c65592c4d6d7552fb6284442906a96a6874cb266.zip cpython-c65592c4d6d7552fb6284442906a96a6874cb266.tar.gz cpython-c65592c4d6d7552fb6284442906a96a6874cb266.tar.bz2 | |
gh-106186: Don't report MultipartInvariantViolationDefect for valid multipart emails when parsing header only (#107016)
Diffstat (limited to 'Lib/email/feedparser.py')
| -rw-r--r-- | Lib/email/feedparser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/feedparser.py b/Lib/email/feedparser.py index 53d71f5..06d6b4a 100644 --- a/Lib/email/feedparser.py +++ b/Lib/email/feedparser.py @@ -189,7 +189,7 @@ class FeedParser: assert not self._msgstack # Look for final set of defects if root.get_content_maintype() == 'multipart' \ - and not root.is_multipart(): + and not root.is_multipart() and not self._headersonly: defect = errors.MultipartInvariantViolationDefect() self.policy.handle_defect(root, defect) return root |
