To eliminate any of my snippets, etc., from the equation, I did an experiment.
I typed the folowing commands on a Linux system:
curl --silent http://www.apache.org/ > x.www.apache.org
curl --silent http://www.w3.org/ > x.www.w3.org
curl --silent http://www.modxcms.com/ > x.www.modxcms.com
vim x.*
Both the Apache Foundation and the World Wide Consortium are big on
standards. The output files from their top pages, as viewed with vim
above, included no CR characters.
The output file from www.modxcms.com had a CR at the end of most lines.
But two "meta" lines in the head, and a couple of "script" lines in the
body, did not contain any CR.
Plenty of web sites send spurious CR characters. These do no harm, other
than taking up some bandwidth. So this bug, if we call it a bug, is
relatively harmless. This extra bandwidth would be of consequence only
on a very busy web site -- like that of Google.
Not only did I see no CR characters from www.google.com, but also all of
the output was squeezed into three line lines. So Google is saving not
only on the spurious CR, but on the required CR-LF as well, by sending
fewer lines.
Yahoo is not quite as frugal. It sent me 179 lines (but no CR).
Rahul
P.S. I am editing this to make the following correction: The spurious
characters are CR, not LF. In my initial posting, I incorrectly wrote LF
instead of CR. Although spurious LF could also occur, I would not see
it as LF, since on my Linux systems an extra LF would just cause an
empty line. It’s possible that people on Microsoft-oriented systems
would notice spurious LFs if they occurred. But i did not see any
extra empty lines in my experiments above.