CGI, SCGI and Certificates (was Re: [ANN] Gemini browser for iOS)
solderpunk
solderpunk at SDF.ORG
Thu Jun 11 18:58:29 BST 2020
On Tue, Jun 09, 2020 at 09:02:24PM -0400, Michael Lazar wrote:
> I believe this is using SCRIPT_NAME incorrectly per RFC 3875. The SCRIPT_NAME
> should be the part of the URI path that comes before the PATH_INFO [1]. So in
> your example:
>
> GEMINI_URL=gemini://lucy.roswell.area51/cgi-bin/beta/foobar?one=1&two=2
> SCRIPT_NAME=/cgi-bin/beta
> PATH_INFO=/foobar
Is this how cgi-bins are traditionally handled? If a URI paths's prefix
matches the configured cgi-bin path, the standard mapping from URI paths
to the filesystem is interrupted, and the first component of the URI path
*after* the cgi-bin prefix (here `beta`) is the only think looked for on
the disk, with everything else passed along to PATH_INFO? If there is,
for example, a /var/gemini/cgi-bin/beta/ directory on the disk, the
server does not check for an executable named `foobar` in it?
Semi-related: when the server forks off the CGI process, is it
conventional to set that process' working directory to the CGI bin?
Cheers,
Solderpunk
More information about the Gemini
mailing list