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 5933c8faa2d627cf6c4cb6703a4ff9fb04754600
parent 2452013f44d23c294bd6a95d5ebc390a6fdd1789
Author: Christoph Lohmann <20h@r-36.net>
Date:   Fri, 12 Jun 2020 23:51:14 +0200

Add legacy backwards compatibility for CGI scripts.

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

diff --git a/ind.c b/ind.c @@ -480,7 +480,12 @@ setcgienviron(char *file, char *path, char *port, char *base, char *args, /* TODO: Separate, if run like rest.dcgi. */ setenv("PATH_INFO", file, 1); setenv("PATH_TRANSLATED", path, 1); + setenv("QUERY_STRING", args, 1); + /* legacy compatibility */ + setenv("SELECTOR", args, 1); + setenv("REQUEST", args, 1); + setenv("REMOTE_ADDR", chost, 1); /* * Don't do a reverse lookup on every call. Only do when needed, in @@ -504,6 +509,8 @@ setcgienviron(char *file, char *path, char *port, char *base, char *args, setenv("SERVER_SOFTWARE", "geomyidae", 1); setenv("X_GOPHER_SEARCH", sear, 1); + /* legacy compatibility */ + setenv("SEARCHREQUEST", sear, 1); if (istls) { setenv("GOPHERS", "on", 1);