Introduction
Introduction Statistics Contact Development Disclaimer Help
Adding nicer error messages. - geomyidae - A small C-based gopherd.
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
commit 63cd2d298843b1f144252f1902a7e1890000e1d7
parent f2c2634b2cdd5ebb5dfc87dbc345f416a5fa7a41
Author: Christoph Lohmann <[email protected]>
Date: Tue, 8 Mar 2011 14:08:08 +0100
Adding nicer error messages.
Diffstat:
M main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/main.c b/main.c
@@ -45,7 +45,7 @@ char *argv0;
char *stdbase = "/var/gopher";
char *stdport = "70";
char *indexf = "/index.gph";
-char *err = "0Sorry, but the requested token could not be found\tErr"
+char *err = "3Sorry, but the requested token '%s' could not be found.\tErr"
"\tlocalhost\t70\r\n.\r\n\r\n";
char *htredir = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//E…
@@ -192,7 +192,7 @@ handlerequest(int sock, char *base, char *ohost, char *port…
return;
}
- send(sock, err, strlen(err), 0);
+ tprintf(sock, err, recvc);
if(loglvl & ERRORS)
logentry(clienth, clientp, recvc, "not found");
}
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.