Introduction
Introduction Statistics Contact Development Disclaimer Help
Revert to handlebin only. Document the dot cr lf case. - geomyidae - A small C-…
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
commit 79f935c4bb64e62262e7c63623d45d681b95d5b2
parent a95a4265767fd7f6f8b6e14fd92e39142244c684
Author: Christoph Lohmann <[email protected]>
Date: Sun, 31 Jan 2021 12:27:55 +0100
Revert to handlebin only. Document the dot cr lf case.
Diffstat:
M handlr.c | 8 --------
M ind.c | 29 +++++++++++++++++++----------
2 files changed, 19 insertions(+), 18 deletions(-)
---
diff --git a/handlr.c b/handlr.c
@@ -127,14 +127,6 @@ handlebin(int sock, char *file, char *port, char *base, ch…
}
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)
{
diff --git a/ind.c b/ind.c
@@ -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[] = {
@@ -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},
};
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.