tRevert to handlebin only. Document the dot cr lf case. - geomyidae - A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
 (HTM) git clone git://r-36.net/geomyidae
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 79f935c4bb64e62262e7c63623d45d681b95d5b2
 (DIR) parent a95a4265767fd7f6f8b6e14fd92e39142244c684
 (HTM) Author: Christoph Lohmann <20h@r-36.net>
       Date:   Sun, 31 Jan 2021 12:27:55 +0100
       
       Revert to handlebin only. Document the dot cr lf case.
       
       Diffstat:
         handlr.c                            |       8 --------
         ind.c                               |      29 +++++++++++++++++++----------
       
       2 files changed, 19 insertions(+), 18 deletions(-)
       ---
 (DIR) diff --git a/handlr.c b/handlr.c
       t@@ -127,14 +127,6 @@ handlebin(int sock, char *file, char *port, char *base, char *args,
        }
        
        void
       -handletxt(int sock, char *file, char *port, char *base, char *args,
       -                char *sear, char *ohost, char *chost, int istls)
       -{
       -        handlebin(sock, file, port, base, args, sear, ohost, chost, istls);
       -        dprintf(sock, ".\r\n");
       -}
       -
       -void
        handlecgi(int sock, char *file, char *port, char *base, char *args,
                        char *sear, char *ohost, char *chost, int istls)
        {
 (DIR) diff --git a/ind.c b/ind.c
       t@@ -28,6 +28,15 @@
        /*
         * Be careful, to look at handlerequest(), in case you add any executing
         * handler, so nocgi will be valuable.
       + *
       + * All files are handled as binary, without a following ".\r\n". Proper
       + * encoding lines with beginning "." would be a really slow function, not
       + * adding any feature to gopher. Clients can check for the types
       + * requested and assume ".\r\n" or leave it out.
       + *
       + * Geomyidae only adds ".\r\n" in all kind of menus, like dir listings
       + * or dcgi files. There the case of some maybe future "." item type needs
       + * to be handled, if really used.
         */
        
        filetype type[] = {
       t@@ -42,16 +51,16 @@ filetype type[] = {
                {"gif", "g", handlebin},
                {"png", "I", handlebin},
                {"bmp", "I", handlebin},
       -        {"txt", "0", handletxt},
       -        {"html", "0", handletxt},
       -        {"htm", "0", handletxt},
       -        {"xhtml", "0", handletxt},
       -        {"css", "0", handletxt},
       -        {"md", "0", handletxt},
       -        {"c", "0", handletxt},
       -        {"sh", "0", handletxt},
       -        {"patch", "0", handletxt},
       -        {"meme", "0", handletxt},
       +        {"txt", "0", handlebin},
       +        {"html", "0", handlebin},
       +        {"htm", "0", handlebin},
       +        {"xhtml", "0", handlebin},
       +        {"css", "0", handlebin},
       +        {"md", "0", handlebin},
       +        {"c", "0", handlebin},
       +        {"sh", "0", handlebin},
       +        {"patch", "0", handlebin},
       +        {"meme", "0", handlebin},
                {NULL, NULL, NULL},
        };