[issue6681] email.parser clips trailing \n of multipart/mixed part if part ends in \r\n

R. David Murray report at bugs.python.org
Fri Aug 14 05:51:12 CEST 2009


R. David Murray <rdmurray at bitdance.com> added the comment:

Looks like it is a regular expression issue.  The code is trying to
delete the last linend before the boundary, which belongs to the
boundary according to the RFC, but it does so with the following RE:

    (\r\n|\r|\n)$

This RE matches '\r\n' in '\r\n\n', which is what Guido's message had. 
The code then deletes the number of characters equal to the length of
the match.  So yes, it is a mixed line ending problem.

----------
nosy: +r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6681>
_______________________________________


More information about the Python-bugs-list mailing list