-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
bpo-36226: Fix multipart false positive header defects #12214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,12 @@ | |
| from email.policy import default | ||
| from test.test_email import TestEmailBase | ||
|
|
||
| class TestFeedParser(TestEmailBase): | ||
| def test_multipart_message_with_headers_only(self): | ||
| import email.parser | ||
| header = 'Content-Type: multipart/related; boundary="==="\r\n\r\n' | ||
| msg = email.parser.Parser().parsestr(header, headersonly=True) | ||
| self.assertDefectsEqual(msg.defects, []) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No longer needed (although it is a more concise test than the one that was committed ;) |
||
|
|
||
| class TestCustomMessage(TestEmailBase): | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Fixes false MultipartInvariantViolationDefects which were triggered when | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't (easily :) tell from these news entries which one is supposed to apply to http and which to email. One of them should go away and the other should clarify which module it applies to. |
||
| only headers of a multipart message were parsed. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Fixes false StartBoundaryNotFoundDefects which were triggered by | ||
| parse_headers not forwarding the headersonly to the email parser. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was apparently fixed in #107016 (#106186).