Complete.Org: Mailing Lists: Archives: gopher: January 2009:
[gopher] Re: How to handle lines beginning by a dot?
Home

[gopher] Re: How to handle lines beginning by a dot?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: gopher@xxxxxxxxxxxx
Subject: [gopher] Re: How to handle lines beginning by a dot?
From: Matjaž Mešnjak <matjaz85@xxxxxxxxx>
Date: Wed, 28 Jan 2009 22:29:46 +0100
Reply-to: gopher@xxxxxxxxxxxx

Hi,
clients will terminate the connection when they find <cr><lf>.<cr><lf> (at
least WSGopher and my Gopher Client). The line ".Blah!" can be sent without
modifications.
If the text file contains "<cr><lf>.<cr><lf>" mail client would transform it
to "<cr><lf>..<cr><lf>", but that's not the case with gopher. For text files
you could modify it to "<cr><lf>.<space><cr><lf>" - that doesn't change the
content but it makes sure the connection isn't terminated. The problem could
be with binary files that contain "<cr><lf>.<cr><lf>" - but the clients that
I tried, downloaded the binary file correctly when it was sent as raw data -
without "<cr><lf>.<cr><lf>" on the end.

Regards,
Matjaz



2009/1/28 Mateusz Viste <mateusz@xxxxxxxxxxxxxxxx>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi everybody!
>
> The Gopher RFC (1436) contains the following note:
>
> "Lines beginning with periods must be prepended with an extra period to
> ensure that the transmission is not terminated early. The client should
> strip extra periods at the beginning of the line."
>
> I do not understand what does it exactly mean...
> If I serve a text file which has a line like ".Blah!", how should I process
> it? I understand that the problem could occur if the client is silly enough
> to close the connection when it finds a dot character after a CR/LF...
>
> Another question - How should I handle text files which contain a line with
> only a dot (".")?
>
> Any suggestions/hints will be appreciated ;-)
>
> Best regards,
> Mateusz Viste
> - --
> You'll find my public OpenPGP key at gopher://
> gopher.viste-family.net/1/PGP
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.9 (GNU/Linux)
>
> iQEcBAEBAgAGBQJJgLj3AAoJEC30Ty9xnkvbxugIAJePLlIIVDMvvNc5NpSWgAe8
> lx06BlwG6sLhBZgi049KtNeubbjxH0zhNXftH5HR0sOio1idWPVyTQbYmlzVdNEp
> z/nsFbtnX2JfrgcVLJvT5DLpHwdJzW+1Q0+hFMtYWyfZnas1n1H68yQ+u5C9iYDE
> OwLVzUWtdzWjbhFtDTQCKKjiRgLf31A2dSTqASYL04mo+0h8yf/IOHdSkquFF0TS
> h33+RAEUdi5vZHG2/6v2O+o02U6vSH8etSiY+96NE5XTNyGbHOLxEd1+EmBATqqC
> xtyM5pozHTdR34GLJthrXwngwp3FLj7Rpl766cSznBhf9gYJu1Y1LNH5HwZ8XjU=
> =48jR
> -----END PGP SIGNATURE-----
>
>
>




[Prev in Thread] Current Thread [Next in Thread]