[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]
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
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.
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://
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.9 (GNU/Linux)
> -----END PGP SIGNATURE-----