Commit Graph

12 Commits

Author SHA1 Message Date
Omar Polo 06f233ad8a ensure we're in the correct state 2021-01-21 19:46:36 +00:00
Omar Polo b4d409cf29 use fnmatch on the domain name 2021-01-21 09:07:26 +00:00
Omar Polo ce79c944bc simplify flow when SNI is missing
this also gives a chance for users to use the default host even if SNI
is missing.
2021-01-21 08:46:07 +00:00
Omar Polo 0ab65593e2 don't crash on wrong vhost or missing SNI
the new logging code was crashing if the client didn't support SNI or
if required an unknown vhost: this because we short-circuit in
handle_handshake to an error, so c->iri isn't populated yet (we don't
even read the request).

fixes #1
2021-01-21 08:26:21 +00:00
Omar Polo 0be51733ef improve logs
now we log the full IRI requested (before was only the path) and the
response line (even for CGI).
2021-01-20 18:54:44 +00:00
Omar Polo 2debfe2b1f drop useless field
was probably added to distinguish between AF_INET and AF_INET6, to use
different functions for logging.  But it wasn't really used, and now
we use getnameinfo anyway.
2021-01-19 18:49:36 +00:00
Omar Polo 6119e13e8a moving "default type" from global options to server options 2021-01-19 11:28:41 +00:00
Omar Polo df79b4c1d5 rename reason to meta 2021-01-19 11:00:06 +00:00
Omar Polo 05c23a54ea add "lang" server option 2021-01-19 10:58:29 +00:00
Omar Polo 132cae8c6f removing err/warn functions with our fatal
err/warn is not available on some systems (unfortunately!) and in any
case don't play well with our daemon mode (that closes std{in,out,err}).
Use our fatal that is daemon-aware.
2021-01-18 18:15:58 +00:00
Omar Polo f87bf597ea removing O_CLOEXEC
we don't fork anymore in that process, so the flag is extra.
2021-01-17 23:25:59 +00:00
Omar Polo d3a08f4d17 reorganize: move bunch of functions to server.c
cgi.c wasn't really needed; it better to group all the server related
functions together, cgi or not.  Now gmid.c contains only startup and
utility code.
2021-01-17 23:23:58 +00:00