[ANN] [users] Two new capsules and a server
op at omarpolo.com
Sun Jan 31 08:33:36 GMT 2021
Sean Conner <sean at conman.org> writes:
> It was thus said that the Great Omar Polo once stated:
>> Other than that, the other features are pretty much what you'd expect:
>> virtual hosts, configuration file with per-location rules, CGI scripts,
>> punycode, IRIs, directory listings ecc.
> The CGI support seems ... not quite the CGI that I know. It's closer to
> SCGI, but even then, it's not SCGI. Looking at the code, any currently
> written CGI script for Gemini won't work out of the box. You might want to
> think about calling it something else, or work to getting actual CGI or SCGI
> support going (SCGI is closer to what you are doing).
Thanks for taking the time and read the code. I admit I've not followed
RFC3875 closely. By skimming it I thought "oh, this is simple" and
implemented it straight away.
What I'm currently doing is executing the script with the virtual host
directory as $PWD and setting a bunch of environmental variables. All
the output of the script is then forwarded to the client.
By re-reading RFC3875 I assume that, except for the environment
variables that I'll double check later, I only need to execute the
script in the script directory instead of the vhost one. The RFC
mention passing data in stdin, but it seems only for POST requests and
I'm assuming Gemini ones are ``GET''. It also mention parsing the query
and passing it as argument to the script: this is something interesting,
but I'm not sure how to spilt it? The & doesn't seem widespread here,
so I have to pass the whole query as first argument?
Of course I'd like to have a complete CGI support, and not something
merely closer, so I'll take some time to read how other servers are
handling them, starting from your GLV-1.12556.
I'd like too, as pointed by John Cowan, to have a best-practices or a
companion specification for CGI on Gemini, as RFC3875 seems quite
HTTP-specific, but I don't think I'm the most qualified to write one :D
More information about the Gemini