As I know, use LF
as line delimiter is quite popular, but I'm wondering why many text protocol like HTTP, FTP use CRLF
as its line delimiter?
I don't think these protocols are invented for old typewriters, so is there any historic reason for this? I tried to search it over google and stackoverflow and wikipedia but do not get any reasonable information.
Thanks
CR-LF as newline is the Internet standard, which long predates HTTP; I believe it was originally specified as part of TELNET in RFC 158 in 1971. The RFC Editor has a page explaining some of the history. This is the convention used by other Internet protocols such as FTP and SMTP, so it only makes sense for HTTP to be consistent with them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With