Introduction
Introduction Statistics Contact Development Disclaimer Help
Terminate data exchange with ".\r\n" for all non-binary types - geomyidae - A s…
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
commit a95a4265767fd7f6f8b6e14fd92e39142244c684
parent bbda3db127acc7e916bdd1668edb00ca7235ad02
Author: Quentin Rameau <[email protected]>
Date: Sat, 30 Jan 2021 19:38:26 +0100
Terminate data exchange with ".\r\n" for all non-binary types
Signed-off-by: Christoph Lohmann <[email protected]>
Diffstat:
M handlr.c | 8 ++++++++
M handlr.h | 2 ++
M ind.c | 20 ++++++++++----------
M index.gph | 3 ++-
4 files changed, 22 insertions(+), 11 deletions(-)
---
diff --git a/handlr.c b/handlr.c
@@ -127,6 +127,14 @@ 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/handlr.h b/handlr.h
@@ -26,6 +26,8 @@ void handlegph(int sock, char *file, char *port, char *base, …
char *sear, char *ohost, char *chost, int istls);
void handlebin(int sock, char *file, char *port, char *base, char *args,
char *sear, char *ohost, char *chost, int istls);
+void handletxt(int sock, char *file, char *port, char *base, char *args,
+ char *sear, char *ohost, char *chost, int istls);
void handlecgi(int sock, char *file, char *port, char *base, char *args,
char *sear, char *ohost, char *chost, int istls);
void handledcgi(int sock, char *file, char *port, char *base, char *args,
diff --git a/ind.c b/ind.c
@@ -42,16 +42,16 @@ filetype type[] = {
{"gif", "g", handlebin},
{"png", "I", handlebin},
{"bmp", "I", handlebin},
- {"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},
+ {"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},
{NULL, NULL, NULL},
};
diff --git a/index.gph b/index.gph
@@ -1,9 +1,10 @@
comment
tcomment
[1|R-36|/|server|port]
-[0|file - comment|/file.dat|server|port]
+[0|file - comment|/file.txt|server|port]
[h|http://www.heise.de|URL:http://www.heise.de|server|port]
[0|some \| escape and [ special characters ] test|error|server|port]
+[9|binary data file|/file.dat|server|port]
[|empty type||server|port]
some invalid line
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.