[ANN] [users] Two new capsules and a server

Sean Conner sean at conman.org
Sun Jan 31 23:28:21 GMT 2021


It was thus said that the Great Omar Polo once stated:
> 
> 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.  

  You're welcome.

> 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?

  You don't split the query.  You pass it in, as is, from the request, in
QUERY_STRING.  Play around with:

	gemini://gemini.conman.org/cgi

It will show all the variables, command line arguments and a breakdown of
the query string.

> 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.

  Warning about my server---the CGI implementation also allows one to run
CGI scripts for a webserver (and Apache in particular) so be aware of that.

> 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

  It's not as HTTP-specific as it may seem---the only bit where it's an
issue is the REQUEST_METHOD.  My server sets it to "" (as there is no method
for Gemini, and what I think it should be, given RFC-3875 makes it
mandatory); others set it to "GET".  Aside from that, it's quite generic.

  -spc




More information about the Gemini mailing list