mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
gh-106186: Don't report MultipartInvariantViolationDefect for valid multipart emails when parsing header only (#107016)
This commit is contained in:
parent
54632528ee
commit
c65592c4d6
4 changed files with 28 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue