[issue39071] email.parser.BytesParser - parse and parsebytes work not equivalent

2019-12-17 Thread Manfred Kaiser
Manfred Kaiser added the comment: I think, the best way is to fix the documentation. The reason is, when a developer rely to the behavior of the function but the behavior is changed, a program may work incorrect. Just think about forensic stuff. If a hash value will be created

[issue39071] email.parser.BytesParser - parse and parsebytes work not equivalent

2019-12-17 Thread Manfred Kaiser
New submission from Manfred Kaiser : I used email.parser.BytesParser for parsing mails. In one programm I used parse, because the email was stored in a file. In a second programm the email was stored in memory as a bytes object. I created hash values from each parts an compared them

[issue39071] email.parser.BytesParser - parse and parsebytes work not equivalent

2019-12-17 Thread Manfred Kaiser
Change by Manfred Kaiser : Added file: https://bugs.python.org/file48786/test.py ___ Python tracker <https://bugs.python.org/issue39071> ___ ___ Python-bugs-list mailin

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-14 Thread Manfred Kaiser
Manfred Kaiser added the comment: as you mentioned, rfc-2047 forbidds encoded words in quoted strings. Source: https://tools.ietf.org/html/rfc2047 - Chapter 5/3 I have tested a few web mail clients and they have the same issue. According to the RFCs, this is not allowed, but I think

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-13 Thread Manfred Kaiser
Manfred Kaiser added the comment: RFC-2184 was obsoleted by RFC-2231 (https://www.rfc-editor.org/rfc/rfc2231.html) There are also no quoted strings, like google uses. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-13 Thread Manfred Kaiser
Manfred Kaiser added the comment: thanks for your response. I have found the RFC https://tools.ietf.org/html/rfc2184 Gmail creates wrong Headers, which are not rfc-compliant. The problem is, that many people are using gmail and emails, which were sent from Gmail might be wrong. How can we

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-13 Thread Manfred Kaiser
Change by Manfred Kaiser : Added file: https://bugs.python.org/file48777/original_mail_from_gmail.eml ___ Python tracker <https://bugs.python.org/issue39040> ___ ___

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-13 Thread Manfred Kaiser
Manfred Kaiser added the comment: The mail was sent from the GMail web interface -- ___ Python tracker <https://bugs.python.org/issue39040> ___ ___ Python-bug

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-13 Thread Manfred Kaiser
Manfred Kaiser added the comment: The original filename is "Schulbesuchsbestättigung.pdf", but when I use the method "get_filename" I got "Schulbesuchsbestättigung.pdf" I removed some headers from the mail for privacy reasons -- Added file: htt

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-13 Thread Manfred Kaiser
Change by Manfred Kaiser : Added file: https://bugs.python.org/file48775/testscript.py ___ Python tracker <https://bugs.python.org/issue39040> ___ ___ Python-bugs-list m

[issue39040] Wrong filename in mail when mime header was too long

2019-12-13 Thread Manfred Kaiser
Change by Manfred Kaiser : -- title: Wrong filename in when mime header was too long -> Wrong filename in mail when mime header was too long ___ Python tracker <https://bugs.python.org/issu

[issue39040] Wrong filename in when mime header was too long

2019-12-13 Thread Manfred Kaiser
Change by Manfred Kaiser : -- keywords: +patch pull_requests: +17062 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17590 ___ Python tracker <https://bugs.python.org/issu

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-13 Thread Manfred Kaiser
Change by Manfred Kaiser : -- title: Wrong filename in mail when mime header was too long -> Wrong attachement filename when mail mime header was too long ___ Python tracker <https://bugs.python.org/issu

[issue39040] Wrong filename in when mime header was too long

2019-12-13 Thread Manfred Kaiser
New submission from Manfred Kaiser : I'm working on a mailfilter in python and used the method "get_filename" of the "EmailMessage" class. In some cases a wrong filename was returned. The reason was, that the Content-Disposition Header had a line break and the