geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

commit f4cac1fea572c34eaf23baef928d7aa313ae9ccf
parent a1cdda3a103efbe3da4dfed6b2b26301d1b83757
Author: Christoph Lohmann <20h@r-36.net>
Date:   Tue, 30 Jan 2018 22:44:21 +0100

Gopher+ in all ways + comment on why it is done.

Diffstat:
main.c | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/main.c b/main.c @@ -134,8 +134,15 @@ handlerequest(int sock, char *base, char *ohost, char *port, char *clienth, if (sear != nil) { *sear++ = '\0'; - /* Gopher+ compatibility hack. */ - if (*sear == '+' || *sear == '$' || *sear == '!') { + /* + * This is a compatibility layer to geomyidae for users using + * the original gopher(1) client. Gopher+ is by default + * requesting the metadata. We are using a trick in the + * gopher(1) parsing code to jump back to gopher compatibility + * mode. DO NOT ADD ANY OTHER GOPHER+ SUPPORT. GOPHER+ IS + * CRAP. + */ + if (*sear == '+' || *sear == '$' || *sear == '!' || *sear == '\0') { dprintf(sock, "+-2\r\n"); dprintf(sock, "+INFO: 1gopher+\t\t%s\t%s\r\n", ohost, port);