Blob


1 It took me a while to release this 1.6 version compared to the previous ones, but we’re finally here!
3 The headlines for this version are an improved CGI implementation and performance, but you’ll find the full changelog at the end of this entry.
5 libevent is now a dependency of gmid: the new event-loop should be faster than the old poll(2)-based one.
7 Thanks to a clear design and privilege-separation, it was easy to spawn multiple server processes: this increases the performance and prevents delays. Three server processes are run by default, but the actual number it’s tunable via the new global ‘prefork’ option.
9 The configuration file was enriched also with some other additions:
10 * ‘block return’ and ‘strip’ allows to define dynamic redirects and/or error pages
11 * ‘entrypoint’ forwards every request for a virtual host to a CGI script
12 * ‘log’ allows to control logging per virtual host
13 * ‘require client ca’ allows to restrict part of a virtual-host only to clients that provides a certificate signed by a specific CA
15 Unfortunately, there are also a couple of breaking changes. I had to change the CGI environment variables so they match the CGI specification. The good news is that now CGI scripts are a bit more portable and that these breaking changes were done early in this release cycle, so if you started using gmid after the 1.5 release chances are that you’re already using these new variables.
17 In particular:
18 * QUERY_STRING is always percent-encoded
19 * PATH_INFO and PATH_TRANSLATED always starts with a forward slash (/)
20 * some variables have been renamed.
22 I set up a testing page that shows the various variables:
24 => gemini://gemini.omarpolo.com/cgi/env CGI test page
27 ## v1.6 “Stargazers” Changelog
29 ### New features
31 * reload configuration on SIGHUP without disconnecting the clients
32 * added ‘block return’, ‘strip’ and ‘entrypoint’ options
33 * added a ‘prefork’ option to control the number of server processes (default: 3)
34 * added ‘require client ca’ option to require client certificates signed by a specific CA
35 * added ‘log’ option to enable/disable logging per-vhost
36 * define TLS_CLIENT_NOT_BEFORE and TLS_CLIENT_NOT_AFTER for CGI scripts
38 ### Improvements
40 * improved the directory listing: print the path of the current directory
41 * for CGI scripts, split the query in words and pass each of them via argv too
42 * [FreeBSD] add capsicum to the logger process
44 ### Bug fixes
46 * CGI scripts now have only std{in,out,err} open
47 * change some CGI variables to match the correct behaviour
49 ### Breaking changes
51 * relative paths are not allowed in the configuration file
52 * some environment variables for CGI script were changed.