Add gophers to CGI environment in case tls is used. - geomyidae - a small C-based gopherd (mirror)
 (HTM) git clone git://git.codemadness.org/geomyidae
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 9d62510690cc6eb31a3ebd766cdab07b9f0dd65b
 (DIR) parent c436fc10abe28f4c60a480cad787f619a3724336
 (HTM) 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:
         M ind.c                               |       6 +++++-
       
       1 file changed, 5 insertions(+), 1 deletion(-)
       ---
 (DIR) 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);