add `log style <style>'; The old default is called `legacy' now, a
new default format is added called `condensed', and `common' and
`combined' to mimick Apache httpd and nginx (respectively) are also
added.
Exit with 0 if the response code was in the 2x or 3x range, or with
2 for other codes. It already exits with 1 upon any other error
(including parsing errors.)
Print the redirect code on 3x to stdout and the meta to stderr for
the 1x, 4x, 5x and 6x ranges.
simplifies further handling. The stdio layer introduces its own
buffering and for the logs I'd like to avoid it. fflush(3) is an
option, but using a raw fd and dprintf(2) requires less code.
this revamps the syntax in the configuration to better match httpd(8)
(and in general be less weird) and to allow per-location fastcgi
configurations.
the bare `param' is now deprecated, but for compatibility it acts
like `fastcgi param' would do now. Same story for `fastcgi <path>'.
Somehow the compat for __dead is not working properly on macos
(cirrus ci) since it complains that parse_debug() does not return
a value in all control paths when it uses usage() (marked as __dead)
to catch a wrong usage.
various servers are not handling correctly the close notify so for
the moment don't turn this into an hard error but just warn.
Hopefully, given some time, most servers will be fixed.
while here, drop the gotos and just use a break to exit the main
loop.
get rid of check_path(), it's overly complicated. Instead, inline
open_file() in client_read() and rework open_dir() to just use
openat() instead of the complicate dance it was doing.
Simplify open_dir() too in the process: if the directory entry for the
index is not a regular file, pretend it doesn't exist.