[gopher] Line terminators in Gopher transactions

Nick Matavka n.theodore.matavka.files at gmail.com
Wed May 23 02:13:19 UTC 2012


On 22 May 2012 05:17, Alistair <alistair at alistairsserver.no-ip.org> wrote:
> On 22/05/2012 04:21, Kim Holviala wrote:
>>
>> On Tue, 22 May 2012, 05:49:55 EEST, Kim Holviala<kim at holviala.com>  wrote:
>>
>>> Traditionally all TCP protocols have used CRLF as the line ending. Major
>>> pain in the ass for both clients and servers, but such is life.
>>
>>
>> The CRLF comes from the original printer meaning of those two ASCII codes:
>> Carriage Return and Line Feed. If you wanted to be at the start of the next
>> line, you needed both.
>
>
> Indeed, this is one of those rare times where windows gets something right
> over unix - using LF on its own is a shorthand for CRLF. Since there's no
> control code for "CR+LF" in ASCII you should send both.
>
> I can't really see how saving one byte per line is worth all the extra
> confusion but this is the system history has burdened us with so we just
> have to manage :)
>
> Line ending detection/correction is trivial to add to a client anyway so
> it's just something you have to take into account.
>
>
> _______________________________________________
> Gopher-Project mailing list
> Gopher-Project at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/gopher-project

If I am sending a text file through Gopher, is it the job of the
server to ensure that the file uses CRLF?  Or is it the job of the
client to properly interpret whatever line ending the server chooses
to use?

-- 
       /^\/^\
       \----|
   _---'---~~~~-_
    ~~~|~~L~|~~~~
       (/_  /~~--
     \~ \  /  /~
   __~\  ~ /   ~~----,
   \    | |       /  \
   /|   |/       |    |
   | | | o  o     /~   |
 _-~_  |        ||  \  /
(// )) | o  o    \\---'
//_- |  |          \
//   |____|\______\__\
~      |   / |    |
       |_ /   \ _|
     /~___|  /____\



More information about the Gopher-Project mailing list