classification
Title: Problem with email.MIME* library, using wrong new line
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: lclement, r.david.murray
Priority: normal Keywords:

Created on 2009-03-20 03:11 by lclement, last changed 2010-01-11 17:23 by r.david.murray. This issue is now closed.

Messages (3)
msg83851 - (view) Author: Luca clementi (lclement) Date: 2009-03-20 03:11
I'm running Python 2.5.2 under Ubuntu 8.10.

In the file email/generator.py from the core library at line 228 in the
function _handle_multipart()
            # delimiter transport-padding CRLF
            print >> self._fp, '\n--' + boundary
but if this function is run under Unix it print only the LF and not the
CRLF as by required by the standard. 

My guess is that this error is also in other part of the library.
SMTP (as HTTP) requires CRLF as new line, by standard, while I see that
at the beginning of the generator.py
NL = '\n'

Am I missing something?

Luca
msg83954 - (view) Author: Luca clementi (lclement) Date: 2009-03-21 23:14
I forgot to say that the 
\n
should be substitute with 
\r\n
CRLF

Luca
msg97593 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-01-11 17:23
Effectively this is a duplicate of issue 1349106, since you are right that it affects more than just boundary production. I believe we are going to address this in a new version of the email module.
History
Date User Action Args
2010-01-11 17:23:41r.david.murraysetstatus: open -> closed
priority: normal


nosy: + r.david.murray
messages: + msg97593
resolution: duplicate
stage: resolved
2009-03-21 23:14:05lclementsetmessages: + msg83954
2009-03-20 03:11:49lclementcreate