Blame


1 f3a795ae 2021-08-03 op It took me a while to release this 1.6 version compared to the previous ones, but we’re finally here!
2 f3a795ae 2021-08-03 op
3 f3a795ae 2021-08-03 op 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.
4 f3a795ae 2021-08-03 op
5 f3a795ae 2021-08-03 op libevent is now a dependency of gmid: the new event-loop should be faster than the old poll(2)-based one.
6 f3a795ae 2021-08-03 op
7 f3a795ae 2021-08-03 op 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.
8 f3a795ae 2021-08-03 op
9 f3a795ae 2021-08-03 op The configuration file was enriched also with some other additions:
10 f3a795ae 2021-08-03 op * ‘block return’ and ‘strip’ allows to define dynamic redirects and/or error pages
11 f3a795ae 2021-08-03 op * ‘entrypoint’ forwards every request for a virtual host to a CGI script
12 f3a795ae 2021-08-03 op * ‘log’ allows to control logging per virtual host
13 f3a795ae 2021-08-03 op * ‘require client ca’ allows to restrict part of a virtual-host only to clients that provides a certificate signed by a specific CA
14 f3a795ae 2021-08-03 op
15 f3a795ae 2021-08-03 op 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.
16 f3a795ae 2021-08-03 op
17 f3a795ae 2021-08-03 op In particular:
18 f3a795ae 2021-08-03 op * QUERY_STRING is always percent-encoded
19 f3a795ae 2021-08-03 op * PATH_INFO and PATH_TRANSLATED always starts with a forward slash (/)
20 f3a795ae 2021-08-03 op * some variables have been renamed.
21 f3a795ae 2021-08-03 op
22 f3a795ae 2021-08-03 op I set up a testing page that shows the various variables:
23 f3a795ae 2021-08-03 op
24 f3a795ae 2021-08-03 op => gemini://gemini.omarpolo.com/cgi/env CGI test page
25 f3a795ae 2021-08-03 op
26 f3a795ae 2021-08-03 op
27 f3a795ae 2021-08-03 op ## v1.6 “Stargazers” Changelog
28 f3a795ae 2021-08-03 op
29 f3a795ae 2021-08-03 op ### New features
30 f3a795ae 2021-08-03 op
31 f3a795ae 2021-08-03 op * reload configuration on SIGHUP without disconnecting the clients
32 f3a795ae 2021-08-03 op * added ‘block return’, ‘strip’ and ‘entrypoint’ options
33 f3a795ae 2021-08-03 op * added a ‘prefork’ option to control the number of server processes (default: 3)
34 f3a795ae 2021-08-03 op * added ‘require client ca’ option to require client certificates signed by a specific CA
35 f3a795ae 2021-08-03 op * added ‘log’ option to enable/disable logging per-vhost
36 f3a795ae 2021-08-03 op * define TLS_CLIENT_NOT_BEFORE and TLS_CLIENT_NOT_AFTER for CGI scripts
37 f3a795ae 2021-08-03 op
38 f3a795ae 2021-08-03 op ### Improvements
39 f3a795ae 2021-08-03 op
40 f3a795ae 2021-08-03 op * improved the directory listing: print the path of the current directory
41 f3a795ae 2021-08-03 op * for CGI scripts, split the query in words and pass each of them via argv too
42 f3a795ae 2021-08-03 op * [FreeBSD] add capsicum to the logger process
43 f3a795ae 2021-08-03 op
44 f3a795ae 2021-08-03 op ### Bug fixes
45 f3a795ae 2021-08-03 op
46 f3a795ae 2021-08-03 op * CGI scripts now have only std{in,out,err} open
47 f3a795ae 2021-08-03 op * change some CGI variables to match the correct behaviour
48 f3a795ae 2021-08-03 op
49 f3a795ae 2021-08-03 op ### Breaking changes
50 f3a795ae 2021-08-03 op
51 f3a795ae 2021-08-03 op * relative paths are not allowed in the configuration file
52 f3a795ae 2021-08-03 op * some environment variables for CGI script were changed.