| Thanks to Christopher Williams the discussion goes on about CGI. - geomyidae - … | |
| git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri… | |
| Log | |
| Files | |
| Refs | |
| Tags | |
| README | |
| LICENSE | |
| --- | |
| commit 1fe0e4e9026fac8fad295deec2b580e611372a29 | |
| parent 25358c41bcecda71584b0fbc431e19a1f5d05497 | |
| Author: Christoph Lohmann <[email protected]> | |
| Date: Sun, 15 Jun 2025 07:34:17 +0200 | |
| Thanks to Christopher Williams the discussion goes on about CGI. | |
| See the change. I added reference for future generations about the | |
| variables, where they come from and why some environment variable is | |
| included. There is even space for future new variables, as the CGI RFC | |
| allows us. | |
| Diffstat: | |
| M ind.c | 22 +++++++++++++++++++++- | |
| 1 file changed, 21 insertions(+), 1 deletion(-) | |
| --- | |
| diff --git a/ind.c b/ind.c | |
| @@ -575,12 +575,32 @@ setcgienviron(char *file, char *path, char *port, char *b… | |
| setenv("SERVER_SOFTWARE", "geomyidae", 1); | |
| /* GOPHER-specific variables */ | |
| + /* This is allowed by RFC3875 */ | |
| setenv("GOPHER_SELECTOR", sel, 1); | |
| setenv("GOPHER_REQUEST", sel, 1); | |
| setenv("GOPHER_SEARCH", sear, 1); | |
| + setenv("GOPHER_SCRIPT_FILENAME", path, 1); | |
| + setenv("GOPHER_DOCUMENT_ROOT", base, 1); | |
| + | |
| /* legacy compatibility */ | |
| - setenv("SEARCHREQUEST", sear, 1); | |
| + /* Gopher stuff should begin with GOPHER_ by RFC3875 */ | |
| + /* See: https://boston.conman.org/2020/01/06.1 */ | |
| setenv("SCRIPT_FILENAME", path, 1); | |
| + /* Bucktooth compatibility */ | |
| + setenv("SELECTOR", sel, 1); | |
| + /* Motsognir compatibility */ | |
| + setenv("QUERY_STRING_SEARCH", sear, 1); | |
| + setenv("QUERY_STRING_URL", sear, 1); | |
| + /* Gophernicus */ | |
| + setenv("SEARCHREQUEST", sear, 1); | |
| + /* | |
| + * TODO Do we need those? Does anyone use those? | |
| + * COLUMNS, DOCUMENT_ROOT, GOPHER_CHARSET, GOPHER_FILETYPE, | |
| + * GOPHER_REFERER, HTTP_ACCEPT_CHARSET, HTTP_REFERER, LOCAL_ADDR, | |
| + * PATH, REQUEST, SERVER_ARCH, SERVER_CODENAME, | |
| + * SERVER_DESCRIPTION, SERVER_TLS_PORT, SERVER_VERSION, | |
| + * SESSION_ID, TLS | |
| + */ | |
| /* Make PHP happy. */ | |
| setenv("REDIRECT_STATUS", "", 1); |