[issue24363] httplib fails to handle semivalid HTTP headers
Change by Christian Schmidbauer : -- keywords: +patch pull_requests: +15787 pull_request: https://github.com/python/cpython/pull/12214 ___ Python tracker <https://bugs.python.org/issue24363> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29353] Incorrect handling of HTTP response with "Content-Type: message/rfc822" header
Change by Christian Schmidbauer : -- pull_requests: +15760 stage: -> patch review pull_request: https://github.com/python/cpython/pull/12214 ___ Python tracker <https://bugs.python.org/issue29353> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36226] multipart/related header causes false positive StartBoundaryNotFoundDefect and MultipartInvariantViolationDefect
Christian Schmidbauer added the comment: @martin.panter: I see a relation to issue 29353, but I don't see why this report here is a duplicate. Could you elaborate on this? Issue 29991 contains parts of what I reported here, but it is closed "resolved" and refers back to 29353. I also tried your patch "policy-flag.patch" and it did not help in the regard of the bug here and tests which are included in the PR. -- ___ Python tracker <https://bugs.python.org/issue36226> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36226] multipart/related header causes false positive StartBoundaryNotFoundDefect and MultipartInvariantViolationDefect
Christian Schmidbauer added the comment: Apologies, here are the correct commit IDs: https://github.com/python/cpython/commit/89285439c7f94a3e62cee3d15e343218903c2af8 https://github.com/python/cpython/pull/12214/commits/a82e662ab3339072d7b86a8090989fba60ef9c37 -- ___ Python tracker <https://bugs.python.org/issue36226> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36226] multipart/related header causes false positive StartBoundaryNotFoundDefect and MultipartInvariantViolationDefect
Change by Christian Schmidbauer : -- hgrepos: +381 ___ Python tracker <https://bugs.python.org/issue36226> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36226] multipart/related header causes false positive StartBoundaryNotFoundDefect and MultipartInvariantViolationDefect
New submission from Christian Schmidbauer : 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 -- components: Library (Lib) messages: 337395 nosy: Christian Schmidbauer priority: normal severity: normal status: open title: multipart/related header causes false positive StartBoundaryNotFoundDefect and MultipartInvariantViolationDefect type: behavior versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue36226> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com