Introduction
Introduction Statistics Contact Development Disclaimer Help
Add comment about special cases in request handling. - geomyidae - A small C-ba…
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
commit 6c9e39e916f752250680a56bc2dad229c040af7a
parent 2f292620fba218aa4d57117dadd4182799f25460
Author: Christoph Lohmann <[email protected]>
Date: Sun, 26 Apr 2020 12:23:19 +0200
Add comment about special cases in request handling.
Diffstat:
M main.c | 12 ++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/main.c b/main.c
@@ -189,6 +189,18 @@ handlerequest(int sock, char *base, char *ohost, char *por…
return;
}
+ /*
+ * Valid cases in gopher we overwrite here, but could be used for
+ * other geomyidae features:
+ *
+ * request string = "?..." -> "/?..."
+ * request string = "" -> "/"
+ * request string = "somestring" -> "/somestring"
+ *
+ * Be careful, when you consider those special cases to be used
+ * for some feature. You can easily do good and bad.
+ */
+
args = strchr(recvb, '?');
if (args != NULL)
*args++ = '\0';
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.