commit 28ec61780962b6aa7b50845e3738399a92dc9e0c from: Omar Polo date: Sun Jan 24 10:06:48 2021 UTC sync the CGI environment with the manpage while there also add SERVER_PROTOCOL commit - ba7b2faa861032ba8e30a76aac2c6eef4de0b84c commit + 28ec61780962b6aa7b50845e3738399a92dc9e0c blob - d7180546bf63b4ce19fb93b06145de72eab148d2 blob + 6b4d42c449fef83f35d7abae8a524b65a0315ff4 --- ex.c +++ ex.c @@ -215,6 +215,7 @@ launch_cgi(const char *spath, const char *relpath, con argv[0] = argv[1] = ex; safe_setenv("GATEWAY_INTERFACE", "CGI/1.1"); + safe_setenv("SERVER_PROTOCOL", "GEMINI"); safe_setenv("SERVER_SOFTWARE", "gmid"); safe_setenv("SERVER_PORT", portno); blob - 95cab4c3f147994137798c25da3b3ddf0fd79c3a blob + e51768c9d681249ae8c76b238fb5506a8c4e02db --- gmid.1 +++ gmid.1 @@ -192,12 +192,20 @@ the environment from .Nm with these additional variables set: .Bl -tag -width 18m +.It Ev GATEWAY_INTERFACE +"CGI/1.1" +.It Ev SERVER_PROTOCOL +"GEMINI" .It Ev SERVER_SOFTWARE "gmid" .It Ev SERVER_PORT "1965" +.It Ev SERVER_NAME +The vhost. +This variable is not available when operating without a configuration. .It Ev SCRIPT_NAME -The (public) path to the script. +The (public) path to the script, e.g. +.Pa "/cgi-bin/example.cgi" .It Ev SCRIPT_EXECUTABLE The full path to the executable. .It Ev REQUEST_URI @@ -217,11 +225,13 @@ parameter to .Nm or the root directory of the virtual host. .It Ev AUTH_TYPE -The string "Certificate" if the client used a certificate, otherwise unset. +The string "Certificate" if the client used a certificate, otherwise +unset. .It Ev REMOTE_USER The subject of the client certificate if provided, otherwise unset. .It Ev TLS_CLIENT_ISSUER -The is the issuer of the client certificate if provided, otherwise unset. +The is the issuer of the client certificate if provided, otherwise +unset. .It Ev TLS_CLIENT_HASH The hash of the client certificate if provided, otherwise unset. The format is "ALGO:HASH".