File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,9 +299,8 @@ def _handle_multipart(self, msg):
299299 # body-part
300300 self ._fp .write (body_part )
301301 # close-delimiter transport-padding
302- self .write (self ._NL + '--' + boundary + '--' )
302+ self .write (self ._NL + '--' + boundary + '--' + self . _NL )
303303 if msg .epilogue is not None :
304- self .write (self ._NL )
305304 if self ._mangle_from_ :
306305 epilogue = fcre .sub ('>From ' , msg .epilogue )
307306 else :
Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ hello
119119
120120
121121--__--__----
122+
122123--192.168.1.2.889.32614.987812255.500.21814
123124Content-type: text/plain; charset=us-ascii
124125Content-description: Digest Footer
Original file line number Diff line number Diff line change @@ -1711,7 +1711,8 @@ def test_no_parts_in_a_multipart_with_none_epilogue(self):
17111711
17121712--BOUNDARY
17131713
1714- --BOUNDARY--''' )
1714+ --BOUNDARY--
1715+ ''' )
17151716
17161717 def test_no_parts_in_a_multipart_with_empty_epilogue (self ):
17171718 outer = MIMEBase ('multipart' , 'mixed' )
@@ -1756,7 +1757,8 @@ def test_one_part_in_a_multipart(self):
17561757Content-Transfer-Encoding: 7bit
17571758
17581759hello world
1759- --BOUNDARY--''' )
1760+ --BOUNDARY--
1761+ ''' )
17601762
17611763 def test_seq_parts_in_a_multipart_with_empty_preamble (self ):
17621764 eq = self .ndiffAssertEqual
@@ -1782,7 +1784,8 @@ def test_seq_parts_in_a_multipart_with_empty_preamble(self):
17821784Content-Transfer-Encoding: 7bit
17831785
17841786hello world
1785- --BOUNDARY--''' )
1787+ --BOUNDARY--
1788+ ''' )
17861789
17871790
17881791 def test_seq_parts_in_a_multipart_with_none_preamble (self ):
@@ -1808,7 +1811,8 @@ def test_seq_parts_in_a_multipart_with_none_preamble(self):
18081811Content-Transfer-Encoding: 7bit
18091812
18101813hello world
1811- --BOUNDARY--''' )
1814+ --BOUNDARY--
1815+ ''' )
18121816
18131817
18141818 def test_seq_parts_in_a_multipart_with_none_epilogue (self ):
@@ -1834,7 +1838,8 @@ def test_seq_parts_in_a_multipart_with_none_epilogue(self):
18341838Content-Transfer-Encoding: 7bit
18351839
18361840hello world
1837- --BOUNDARY--''' )
1841+ --BOUNDARY--
1842+ ''' )
18381843
18391844
18401845 def test_seq_parts_in_a_multipart_with_empty_epilogue (self ):
Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ Core and Builtins
4848Library
4949-------
5050
51+ - Issue #14983: email.generator now always adds a line end after each MIME
52+ boundary marker, instead of doing so only when there is an epilogue. This
53+ fixes an RFC compliance bug and solves an issue with signed MIME parts.
54+
5155- Issue #20540: Fix a performance regression (vs. Python 3.2) when layering
5256 a multiprocessing Connection over a TCP socket. For small payloads, Nagle's
5357 algorithm would introduce idle delays before the entire transmission of a
You can’t perform that action at this time.
0 commit comments