fix for extra trailing new lines on attachments #508

merged 2 commits into from Feb 10, 2013


None yet
2 participants

Aalanar commented Feb 8, 2013

When sending ascii encoded attachments there is an extra newline appearing at the end of files.


jeremy commented Feb 10, 2013

Verified that leading CRLF should be considered part of the boundary, not the preceding attachment. RFC2046 5.1.1:

 NOTE:  The CRLF preceding the boundary delimiter line is conceptually
   attached to the boundary so that it is possible to have a part that
   does not end with a CRLF (line  break).  Body parts that must be
   considered to end with line breaks, therefore, must have two CRLFs
   preceding the boundary delimiter line, the first of which is part of
   the preceding body part, and the second of which is part of the
   encapsulation boundary.

This is a regression since we're no longer stripping all trailing whitespace, which hid this bug.

jeremy added a commit that referenced this pull request Feb 10, 2013

Merge pull request #508 from Aalanar/master
fix for extra trailing new lines on attachments

@jeremy jeremy merged commit e9b0043 into mikel:master Feb 10, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment