Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix the CGI PATH variables. - geomyidae - A small C-based gopherd.
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
commit 204334bcd5b557e42bafc47502016d7f0f71ca91
parent f4e4537ed6597fecff177869993b0c334b257d64
Author: Christoph Lohmann <[email protected]>
Date: Fri, 26 Jan 2018 14:08:55 +0100
Fix the CGI PATH variables.
Diffstat:
M 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);
/*
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.