[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC1154 line counts again
In <>, Robert Ullmann writes:
>On UN*X, there is a particularily simple definition of
>a line, in the context of SMTP and RFC822; sendmail (or
>whatever, e.g. MMDF) have delivered the message into a file.
>fgets(buf, 1000, file);
>reads exactly one line.
That is not the point. fgets() is a C stdio call. Any system with a C
compiler has it. The semantics of fgets() are the local system's semantics.
They are not SMTP/RFC-822 semantics.
>In practice, the line terminator in SMTP has to be seen
>as either LF or CR LF if you want to talk to lots of existing
>"implementations". I'm not sure this is a bad thing.
That is not what SMTP or RFC-822 says. I am well aware of the bug that many
Unix systems use bare LF instead of CRLF. It's a hard bug to avoid on Unix.
But that is not the point. A strictly RFC-compliant implementation treats
bare LF as an ordinary character, and hence would not count it as a line
delimiter for the purposes of RFC-1154. This introduces an ambiguity.
I would not be adverse to a redefinition of the SMTP/RFC-822 newline to be
bare LF with CR defined as a "to be ignored character." But that would need
the agreement of a much larger community than this WG.