[Patches] [ python-Patches-523241 ] MimeWriter must use CRLF instead of LF

noreply@sourceforge.net noreply@sourceforge.net
Fri, 01 Mar 2002 13:42:16 -0800


Patches item #523241, was opened at 2002-02-26 21:33
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=523241&group_id=5470

Category: Library (Lib)
Group: Python 2.2.x
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Clarence Gardner (cgardner)
>Assigned to: Barry Warsaw (bwarsaw)
Summary: MimeWriter must use CRLF instead of LF

Initial Comment:
In all of the output that MimeWriter does (headers and
boundaries), a CRLF must be written rather than just LF.
(CRLF at the end of the header, and at the beginning and
end of the boundaries.)

Here's hoping I'm doing this right :)

----------------------------------------------------------------------

Comment By: Barry Warsaw (bwarsaw)
Date: 2002-03-01 16:35

Message:
Logged In: YES 
user_id=12800

Guido is correct, and while I personally consider MIMEWriter
obsolete <wink>, I have taken the same approach with the
email package.  IMO, both modules should read and write
native line endings.  It is the responsibility of smtplib
(in the case of sending the msg over the wire) or the MTA's
program/file filter (in the case of receiving the msg from
the wire) to translate from RFC 2822 line endings to native
line endings, and vice versa.

I recommend this patch be rejected.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-02-28 18:03

Message:
Logged In: YES 
user_id=6380

Thanks for bearing with us. SF may be the worst possible
tool, but I don't know anything better. :-(

Having seen the patch, I disagree with your intent. This
issue has come up before.

While the MIME standard stipulates that newlines are
represented as CRLF on the wire, we're not writing files on
the wire. We're using the local line ending convention
consistently whenever we read or write email, and some other
entity is responsible for translating these to the proper
CRLF.

Maybe you can come up with a fix to the documentation that
explains this policy instead?


----------------------------------------------------------------------

Comment By: Clarence Gardner (cgardner)
Date: 2002-02-28 17:41

Message:
Logged In: YES 
user_id=409146

Actually, it's a SourceForge bug :(
I did check the box and attach the file, but it gave me a
"Bad Filename"
error. I did it again, removing the quotes that my browser
put around the
filename, and it said "You already submitted this! Don't
doubleclick!"

So maybe not *everybody's* submissions that lack a file came
from
an idiot :)

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-02-28 17:32

Message:
Logged In: YES 
user_id=6380

There's no uploaded file!  You have to check the
checkbox labeled "Check to Upload & Attach File"
when you upload a file.

Please try again.

(This is a SourceForge annoyance that we can do
nothing about. :-( )

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=523241&group_id=5470