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 @@ -1745,7 +1745,8 @@ def test_no_parts_in_a_multipart_with_none_epilogue(self):
17451745
17461746--BOUNDARY
17471747
1748- --BOUNDARY--''' )
1748+ --BOUNDARY--
1749+ ''' )
17491750
17501751 def test_no_parts_in_a_multipart_with_empty_epilogue (self ):
17511752 outer = MIMEBase ('multipart' , 'mixed' )
@@ -1790,7 +1791,8 @@ def test_one_part_in_a_multipart(self):
17901791Content-Transfer-Encoding: 7bit
17911792
17921793hello world
1793- --BOUNDARY--''' )
1794+ --BOUNDARY--
1795+ ''' )
17941796
17951797 def test_seq_parts_in_a_multipart_with_empty_preamble (self ):
17961798 eq = self .ndiffAssertEqual
@@ -1816,7 +1818,8 @@ def test_seq_parts_in_a_multipart_with_empty_preamble(self):
18161818Content-Transfer-Encoding: 7bit
18171819
18181820hello world
1819- --BOUNDARY--''' )
1821+ --BOUNDARY--
1822+ ''' )
18201823
18211824
18221825 def test_seq_parts_in_a_multipart_with_none_preamble (self ):
@@ -1842,7 +1845,8 @@ def test_seq_parts_in_a_multipart_with_none_preamble(self):
18421845Content-Transfer-Encoding: 7bit
18431846
18441847hello world
1845- --BOUNDARY--''' )
1848+ --BOUNDARY--
1849+ ''' )
18461850
18471851
18481852 def test_seq_parts_in_a_multipart_with_none_epilogue (self ):
@@ -1868,7 +1872,8 @@ def test_seq_parts_in_a_multipart_with_none_epilogue(self):
18681872Content-Transfer-Encoding: 7bit
18691873
18701874hello world
1871- --BOUNDARY--''' )
1875+ --BOUNDARY--
1876+ ''' )
18721877
18731878
18741879 def test_seq_parts_in_a_multipart_with_empty_epilogue (self ):
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ Core and Builtins
2727Library
2828-------
2929
30+ - Issue #14983: email.generator now always adds a line end after each MIME
31+ boundary marker, instead of doing so only when there is an epilogue. This
32+ fixes an RFC compliance bug and solves an issue with signed MIME parts.
33+
3034- Issue #20540: Fix a performance regression (vs. Python 3.2) when layering
3135 a multiprocessing Connection over a TCP socket. For small payloads, Nagle's
3236 algorithm would introduce idle delays before the entire transmission of a
You can’t perform that action at this time.
0 commit comments