Non destructive folding/unfolding (ie, no insertion of whitespace in unfolding)
"Mikel Lindsaar" <[email protected]>
| Newsgroups | gmane.ietf.rfc822 |
|---|---|
| Message-ID | <[email protected]> |
Hello list, This is my first post, so I apologise if this has already been covered. I searched through the full text archive file of ietf-822 (after going through the full itef-smtp archive file) and could not find a concrete answer to my question. I am improving/fixing bugs in a Email library for Ruby - I didn't originally write the library, so I am being very careful in any changes I make. One situation I have is where a X-header field and Reply-To field has a single piece of text that is longer than the 78 octet limit, but has no white space break. For example: Reply-To: <1234-1234-1234-1234-1234-1234-1234-1234-1234@me-some-host-over-here.org> The library currently folds this line as: Reply-To:CRLF LWSP<1234-1234-1234-1234...blah-with-no-further-fold Now, I have two questions. 1) I believe that putting the CRLF immediately after the : in the header field name is in violation of 2822 specifically that the header line should contain the name, a colon, the field and terminated by a CRLF. Would this be a correct interpretation? 2) Irregardless of (1), what is the correct handling of a piece of text in the field that is longer than 78 characters, but contains no whitespace to fold? ie, in unfolding, no whitespace can be inserted back into the original text which would be destructive to the original text. I saw one mention of doing this: Reply-To: <1234-1234-1234-1234-1234-12\CRLF LWSP34-1234-1234-1234 But I can not find this in the RFC 2822 and my library breaks on this when it tries to unfold, so I am not sure if my library's unfolding function is at fault or if my folding implementation is incorrect. If I have missed something obvious, I apologise. Regards Mikel