Commits


rename reschedule_* to yield_*


define TLS_VERSION, TLS_CIPHER and TLS_CIPHER_STRENGTH for CGI scripts


list instead of fixed-size array for vhosts and locations saves some bytes of memory and removes the limit on the maximum number of vhosts and location blocks.


move all sandbox-related code to sandbox.c while there, add capsicum for the logger process


refactoring: imsg everywhere use imsg to handle ALL kinds of IPC in gmid. This simplifies and shorten the code, and makes everything more uniform too.


move vhost_should_log call to server.c log.o is linked to some regress/ stuff. Calling from there a vhost_* function means that we should link the regress/stuff to server.o too (and that would pull in other stuff...). Moving the call is easier, and also probably better.


add `log on/off' to enable/disable logs per-location


tests and compat for imsg


mark reschedule_write inline & static


other s/fnmatch/matches


fix various compilation errors Include gmid.h as first header in every file, as it then includes config.h (that defines _GNU_SOURCE for instance). Fix also a warning about unsigned vs signed const char pointers in openssl.


accept4 -> accept accept4(2) isn't part of any standard (even though it'll be part in the future) and raises warnings on some linux distro. Moreover, we don't have thread that may fork at any time, so doing a mark_nonblock after isn't a big deal.


typo


fix occurrence of (killed) load_file


don't mmap Before we mmap(2) file for reading, and use a buffer to handle CGI scripts. Turns out, for sequential access over the whole mmap isn't better than our loop on read. This has also the additional advantage that we can use handle_cgi (now handle_copy) for both files and CGI, which is pretty cool. This also fixes a nasty bug where we could hang a connection forever, because we scheduled the wrong type of event (read on POLLOUT and write on POLLIN, it's the other way around!)