On Monday, August 20, 2001, at 08:21 AM, Cabrera, Alan wrote:
CR = <US-ASCII CR, carriage return (13)> LF = <US-ASCII LF, linefeed (10)>
HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all protocol elements except the entity-body (see appendix 19.3 for tolerant applications). The end-of-line marker within an entity-body is defined by its associated media type, as described in section 3.7.
19.3 Tolerant Applications
The line terminator for message-header fields is the sequence CRLF. However, we recommend that applications, when parsing such headers, recognize a single LF as a line terminator and ignore the leading CR.
That's not really relevant, as thats the protocol, which probably just sends CRLF always because its broken for platforms that use CR as a line terminator.
As for the browser, the HTML interpreter collapses all white space into a single space before interpreting it, so line endings are basically turned into spaces, and whether CRLF generates one space or two before being collapses doesn't matter. That's how it can deal with .html files created on 3 different platforms.
In our case, I say we just accept CR or LF as a line terminator, and we ignore zero length lines such as occur between a CRLF pair. Then all platforms will work.
Pierce