Commits


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!)


fix config reload the old server processes would stick around waiting on the signals events. While there, also drop the `struct server_events' and define events as globals.


fix "first location" bug reported by devel at datenbrei dot de. The first location would overwrite the default value for a server, triggering the "`foo' rule specified more than once" error. This also needed a small tweak on how we match locations to avoid breaking other tests.


add `require client ca' rule to require certs signed by a CA


refactor apply_block_return move the strip and fmt logic to their own function


fix seccomp for the new event loop add/remove syscalls from the BPF filter and move sandbox() after libevent initialisation


rewrite main loop using libevent


define TLS_CLIENT_NOT_BEFORE/NOT_AFTER in CGI scripts


don't fprintf


improve logs management


handle also EAGAIN together with EWOULDBLOCK