Re: CRLF vs LF was: Re: holding connections open...

Nathaniel Borenstein (nsb@nsb.fv.com)
Mon, 19 Sep 1994 06:28:13 -0400 (EDT)


Excerpts from www-talk: 18-Sep-94 Re: CRLF vs LF was: Re: hol..
hallam@dxal18.cern.ch (464)

> >Am I imagining things are do we have some inconsistency about how
> >servers terminate their header lines? Out of the side of my eye last
> >week I think I perceived two major servers (NCSA and CERN) having
> >different opinions whether to terminate a header line with a simple LF
> >or a CRLF pair.

> Both are permitted under RFC822 rules. Basically you can't guarantee
> that a telnet port will send CRLF or that it will only send LF so both have
> to be OK.

Actually, this is not correct. RFC822 (and, by extension, MIME) are
very clear that the only legitimate line break is the CRLF pair. We may
not like it, but it is absolutely true. In fact, if you have, for
example, two sendmail implementations on two different UNIX machines
talking to each other, the sender translates LF to CRLF, sends it over
the wire, and then the receiver translates CRLF back to LF for local
delivery. That's really the way it works.

Now, there's no reason in principle why the Web can't loosen RFC822
restrictions, but it's a slippery slope, and I'm not sure it's worth the
marginal benefits it brings in this case. At any rate, one should be
clear that the RFC822 rules are in fact quite strict on this matter. --
Nathaniel