michael-lazar / finger2020

👉 😳 A tiny, secure finger daemon for single-user UNIX systems
MIT License
16 stars 2 forks source link

Ending with CRLF? #1

Closed kseistrup closed 3 years ago

kseistrup commented 4 years ago

I noticed that the response from finger2020 ends abruptly without a line terminator. The specs says

Receive information which will vary depending on the above line and the particular system.

so I can't really complain, it's just unusual, isn't it? It is visible in my working shell (fish) that the line terminator is missing. POSIX says that a line is zero or more characters, ending with a LF. This probably doesn't count for the finger protocol, but I am curious to hear if you are deliberately omitting the CRLF at the end?

Cheers.

michael-lazar commented 3 years ago

Apologies, I must have missed this issue earlier.

This was not deliberate for any reason. I agree that the RFC doesn't dictate one way or the other which is slightly annoying. My usual finger client FINGER(1) was inserting a newline for me so I just never noticed.

However, I was playing around with lynx recently and I noticed that lynx was chopping off the last line of my message. So that's reason enough for me to stick an extra CRLF on it.

Updated in 4c1c8785