trusteddomainproject / OpenARC

Open source ARC implementation
BSD 2-Clause "Simplified" License
135 stars 45 forks source link

do not use CR to fold a long header line #39

Closed juh closed 7 years ago

juh commented 7 years ago

In function arc_getamshdr_d() in file libopenarc/arc.c the long AMS/AS header will be chopped into short pieces, separated by "\r\n\t". This will insert CR ("\r") at the line ends of these headers and break some MUAs (e.g. K9 Mail on Android). The documentation of smfi_addheader() and smfi_insheader() says:

To make a multi-line header, insert a line feed (ASCII 0x0a, or \n in C) followed by at least one whitespace character such as a space (ASCII 0x20) or tab (ASCII 0x09, or \t in C). The line feed should NOT be preceded by a carriage return (ASCII 0x0d); the MTA will add this automatically.