Yu Zhao added the comment:
This at least shouldn't be done for the BytesGenerator - it breaks binary data
integrity. IMO, doing it for the string Generator is not necessary either. The
linesep is a policy regarding to MIME syntax. It shouldn't be applied to the
payload. Imagine what would
R. David Murray added the comment:
The payload must also use \r\n per RFC, unless it is a non-text part, in which
case it uses \r\n to separate the content transfer encoded lines. If you want
binary integrity you must use a binary MIME type.
--
Yu Zhao added the comment:
Ack (Per rfc2046 4.1.1). Since the _writeBody is set to _handle_text when no
proper handler exists, the problem should be fixed by adding a binary body
handler to BytesGenerator. Will create a separate issue to track the problem.
--
R. David Murray added the comment:
There already is one: issue 19003.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14645
___
___
R. David Murray added the comment:
Well, that may not be exactly the same issue, but I suspect it is related.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14645
___
Roundup Robot added the comment:
New changeset 30c0f0dd0b94 by R David Murray in branch '3.2':
#14645: Generator now emits correct linesep for all parts.
http://hg.python.org/cpython/rev/30c0f0dd0b94
New changeset 1b9dc00c4d57 by R David Murray in branch '3.3':
Merge: #14645: Generator now
R. David Murray added the comment:
I'm not going to fix this in Python2. While the problem exists there, it
hasn't ever been reported as a bug. As noted earlier, this is probably
primarily due to the fact that it would be very exceptional to read an email in
python2 with anything other than
R. David Murray added the comment:
Here's a patch, against 3.2. It definitely does affect smtplib.send_message.
--
keywords: +patch
priority: normal - high
stage: needs patch - patch review
Added file: http://bugs.python.org/file29300/generator_lineneds.patch
Changes by R. David Murray rdmur...@bitdance.com:
--
assignee: r.david.murray -
components: +email
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14645
___
New submission from R. David Murray rdmur...@bitdance.com:
I ran into this while translating a test, but it turns out it is a long
standing problem. I presume it has not been an issue because in general in
Python2 email messages are read as text with universal newline support, and
thus the
10 matches
Mail list logo