This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cschmidbauer
Recipients cschmidbauer
Date 2019-03-07.15:31:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551972677.41.0.0937724546543.issue36226@roundup.psfhosted.org>
In-reply-to
Content
The current implementation of `multipart/related` in urllib triggers header defects even though the headers are valid:
`[StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()]`

The example header is valid according to RFC 2387 (https://tools.ietf.org/html/rfc2387):
```
Content-Type: multipart/related; boundary="==="

```

Both defects are triggered by the fact that httplib only passes on headers to the underlying email parser, while the email parser assumes to receive a full message. The simple fix is to tell the underlying email parser that we are only passing the header: 0a89fc15c93c271eb08e46e2cda9a72adb97d633

The second issue is related, but independent: The underlying email parser checks if the parsed message is of type multipart by checking of the object "root" is of type list. As we only passed the header (and set `headersonly=True`), the check does makes no sense anymore at this point, creating a false positive: fdc7c47b77e330a36255fd00dc36accd72824e5b
History
Date User Action Args
2019-03-07 15:31:17cschmidbauersetrecipients: + cschmidbauer
2019-03-07 15:31:17cschmidbauersetmessageid: <1551972677.41.0.0937724546543.issue36226@roundup.psfhosted.org>
2019-03-07 15:31:17cschmidbauerlinkissue36226 messages
2019-03-07 15:31:17cschmidbauercreate