geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

commit 204334bcd5b557e42bafc47502016d7f0f71ca91
parent f4e4537ed6597fecff177869993b0c334b257d64
Author: Christoph Lohmann <20h@r-36.net>
Date:   Fri, 26 Jan 2018 14:08:55 +0100

Fix the CGI PATH variables.

Diffstat:
ind.c | 9++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/ind.c b/ind.c @@ -423,19 +423,14 @@ void setcgienviron(char *file, char *path, char *port, char *base, char *args, char *sear, char *ohost, char *chost) { - char *s; unsetenv("AUTH_TYPE"); unsetenv("CONTENT_LENGTH"); unsetenv("CONTENT_TYPE"); setenv("GATEWAY_INTERFACE", "CGI/1.1", 1); /* TODO: Separate, if run like rest.dcgi. */ - setenv("PATH_INFO", path, 1); - - s = smprintf("%s/%s", base, path); - setenv("PATH_TRANSLATED", s, 1); - free(s); - + setenv("PATH_INFO", file, 1); + setenv("PATH_TRANSLATED", path, 1); setenv("QUERY_STRING", args, 1); setenv("REMOTE_ADDR", chost, 1); /*