💾 Archived View for rawtext.club › ~sloum › geminilist › 004970.gmi captured on 2023-09-08 at 17:32:18. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
Omar Polo 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).
-spc
Thanks for taking the time and read the code. I admit I've not followedRFC3875 closely. By skimming it I thought "oh, this is simple" andimplemented it straight away.
What I'm currently doing is executing the script with the virtual hostdirectory as $PWD and setting a bunch of environmental variables. Allthe output of the script is then forwarded to the client.
By re-reading RFC3875 I assume that, except for the environmentvariables that I'll double check later, I only need to execute thescript in the script directory instead of the vhost one. The RFCmention passing data in stdin, but it seems only for POST requests andI'm assuming Gemini ones are ``GET''. It also mention parsing the queryand 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 somethingmerely closer, so I'll take some time to read how other servers arehandling them, starting from your GLV-1.12556.
I'd like too, as pointed by John Cowan, to have a best-practices or acompanion specification for CGI on Gemini, as RFC3875 seems quiteHTTP-specific, but I don't think I'm the most qualified to write one :D