Bugs: Browse | Submit New | Admin

[#9794] Parser does not work with CRLF line endings

Date:
2007-04-03 20:32
Priority:
3
Submitted By:
Sarwat Khan (sarwat)
Assigned To:
Matt Armstrong (matta)
Category:
None
State:
Open
Summary:
Parser does not work with CRLF line endings

Detailed description
I was trying to use RubyMail to parse a multipart/related message coming over HTTP, combining some of the HTTP headers
(Content-Type) with the rest of the POST data. However, the line endings of the incoming data ended with CRLF (as per
RFC 822), and these were choking RubyMail.

I fixed the problem by changing references in the RMail code from \n to \r\n, but I didn't make my solution thorough
enough (I didn't need it robust, I was making a proof of concept).

Perhaps \n works on Windows because the line ending on Windows is CRLF, but on Unix \n is just LF.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-12-01 05:05
Sender: Matt Armstrong

Yes, seems to be a frequent problem people run into.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
assigned_tonone2008-12-01 05:05matta