commit 63cd2d298843b1f144252f1902a7e1890000e1d7
parent f2c2634b2cdd5ebb5dfc87dbc345f416a5fa7a41
Author: Christoph Lohmann <20h@r-36.net>
Date: Tue, 8 Mar 2011 14:08:08 +0100
Adding nicer error messages.
Diffstat:
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//EN\"\n"
@@ -192,7 +192,7 @@ handlerequest(int sock, char *base, char *ohost, char *port, char *clienth,
return;
}
- send(sock, err, strlen(err), 0);
+ tprintf(sock, err, recvc);
if(loglvl & ERRORS)
logentry(clienth, clientp, recvc, "not found");
}