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 9d62510690cc6eb31a3ebd766cdab07b9f0dd65b
parent c436fc10abe28f4c60a480cad787f619a3724336
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sun, 14 May 2023 00:12:04 +0200

Add gophers to CGI environment in case tls is used.

Diffstat:
Mind.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ind.c b/ind.c @@ -572,7 +572,11 @@ setcgienviron(char *file, char *path, char *port, char *base, char *args, setenv("SERVER_NAME", ohost, 1); setenv("SERVER_PORT", port, 1); setenv("SERVER_LISTEN_NAME", bhost, 1); - setenv("SERVER_PROTOCOL", "gopher/1.0", 1); + if (istls) { + setenv("SERVER_PROTOCOL", "gophers/1.0", 1); + } else { + setenv("SERVER_PROTOCOL", "gopher/1.0", 1); + } setenv("SERVER_SOFTWARE", "geomyidae", 1); setenv("X_GOPHER_SEARCH", sear, 1);