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.
If a TLS handshake fails there's nothing we can do, so don't attempt
to reply an error (the connected client is not speaking Gemini as
it's not using TLS at all) and instead just close the connection.
Fixes issue #13
- minor improvements to the wording - drop the removed global options
ipv6 and port - remove config-less mention - document `listen on'
- update examples
While `ipv6' and `port' are still supported for backward compatibility,
it's better to not document them anymore.
- it doesn't run anymore without a config file - a reload is enough
to re-open the directories.
This last point in particular was done this way to allow using
capsicum(4) on FreeBSD, something that is currently impossible. I
may just remove it.