diff --git a/ex.c b/ex.c index d718054..6b4d42c 100644 --- a/ex.c +++ b/ex.c @@ -215,6 +215,7 @@ launch_cgi(const char *spath, const char *relpath, const char *query, 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); diff --git a/gmid.1 b/gmid.1 index 95cab4c..e51768c 100644 --- a/gmid.1 +++ b/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".