cpython: 7486c45eb53f (original) (raw)
Mercurial > cpython
changeset 89069:7486c45eb53f
Merge: #14983: always add a line end after a MIME boundary marker. [#14983]
R David Murray rdmurray@bitdance.com | |
---|---|
date | Sat, 08 Feb 2014 17:56:17 -0500 |
parents | 7fc1e8095fb8(current diff)c2538789c8cf(diff) |
children | 2b9c10f3b969 |
files | Lib/test/test_email/test_email.py Misc/NEWS |
diffstat | 4 files changed, 16 insertions(+), 7 deletions(-)[+] [-] Lib/email/generator.py 3 Lib/test/test_email/data/msg_02.txt 1 Lib/test/test_email/test_email.py 15 Misc/NEWS 4 |
line wrap: on
line diff
--- a/Lib/email/generator.py +++ b/Lib/email/generator.py @@ -299,9 +299,8 @@ class Generator: # body-part self._fp.write(body_part) # close-delimiter transport-padding
self.write(self._NL + '--' + boundary + '--')[](#l1.7)
self.write(self._NL + '--' + boundary + '--' + self._NL)[](#l1.8) if msg.epilogue is not None:[](#l1.9)
self.write(self._NL)[](#l1.10) if self._mangle_from_:[](#l1.11) epilogue = fcre.sub('>From ', msg.epilogue)[](#l1.12) else:[](#l1.13)
--- a/Lib/test/test_email/data/msg_02.txt +++ b/Lib/test/test_email/data/msg_02.txt @@ -119,6 +119,7 @@ hello -------- + --192.168.1.2.889.32614.987812255.500.21814 Content-type: text/plain; charset=us-ascii Content-description: Digest Footer
--- a/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py @@ -1745,7 +1745,8 @@ From: bperson@dom.ain --BOUNDARY ---BOUNDARY--''') +--BOUNDARY-- +''') def test_no_parts_in_a_multipart_with_empty_epilogue(self): outer = MIMEBase('multipart', 'mixed') @@ -1790,7 +1791,8 @@ MIME-Version: 1.0 Content-Transfer-Encoding: 7bit hello world ---BOUNDARY--''') +--BOUNDARY-- +''') def test_seq_parts_in_a_multipart_with_empty_preamble(self): eq = self.ndiffAssertEqual @@ -1816,7 +1818,8 @@ MIME-Version: 1.0 Content-Transfer-Encoding: 7bit hello world ---BOUNDARY--''') +--BOUNDARY-- +''') def test_seq_parts_in_a_multipart_with_none_preamble(self): @@ -1842,7 +1845,8 @@ MIME-Version: 1.0 Content-Transfer-Encoding: 7bit hello world ---BOUNDARY--''') +--BOUNDARY-- +''') def test_seq_parts_in_a_multipart_with_none_epilogue(self): @@ -1868,7 +1872,8 @@ MIME-Version: 1.0 Content-Transfer-Encoding: 7bit hello world ---BOUNDARY--''') +--BOUNDARY-- +''') def test_seq_parts_in_a_multipart_with_empty_epilogue(self):
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -27,6 +27,10 @@ Core and Builtins Library ------- +- Issue #14983: email.generator now always adds a line end after each MIME