Omar Polo
0b8133c264
add check for libevent
2021-02-08 10:11:23 +00:00
Omar Polo
abc007d2b3
rewrite main loop using libevent
2021-02-08 10:01:45 +00:00
Omar Polo
b63e30ff44
define TLS_CLIENT_NOT_BEFORE/NOT_AFTER in CGI scripts
2021-02-07 21:47:01 +00:00
Omar Polo
9f006a2127
[cgi] split the query in words if needed and add them to the argv
2021-02-07 18:55:04 +00:00
Omar Polo
a13739138b
add trailing \n in yyerror
2021-02-07 18:08:50 +00:00
Omar Polo
7e9b7812b3
move logging code to log.c
2021-02-07 16:15:51 +00:00
Omar Polo
3077ce5bee
don't fprintf
2021-02-07 16:10:09 +00:00
Omar Polo
a64959c99a
use log_err instead of fprintf
2021-02-07 16:09:49 +00:00
Omar Polo
3abf91b0b4
improve logs management
2021-02-07 15:30:28 +00:00
Omar Polo
a709ddf5eb
added prefork option
2021-02-07 12:05:32 +00:00
Omar Polo
cfb8a77fd4
handle also EAGAIN together with EWOULDBLOCK
2021-02-07 12:04:11 +00:00
Omar Polo
2564eddee4
add set -e to env script
...
It avoids some long sequences of "echo: IO error" when the client
close the connection before EOF.
2021-02-07 11:32:53 +00:00
Omar Polo
809c4bd0f8
keep original CFLAGS
2021-02-07 11:28:42 +00:00
Omar Polo
eef0492e35
add missing declaration of TENTRYPOINT
2021-02-07 11:27:15 +00:00
Omar Polo
60dbafbf2f
define MANDIR
2021-02-07 09:24:00 +00:00
Omar Polo
1487e11eda
drop sample.conf and add something to the README.md
2021-02-06 19:05:40 +00:00
Omar Polo
2b92a4477a
reorder stuff
2021-02-06 18:50:42 +00:00
Omar Polo
3704b36bda
add script for the regress suite
2021-02-06 18:29:36 +00:00
Omar Polo
6c6f242a54
escape %
2021-02-06 18:28:56 +00:00
Omar Polo
e3ddf39095
add the ``entrypoint'' option
2021-02-06 18:28:43 +00:00
Omar Polo
afc025ff60
restart the daemon instead of kill+start
...
this way we can also test the reload capability!
2021-02-06 17:35:48 +00:00
Omar Polo
cd76162494
swap check in vhost_* fns
...
it's faster (statistically speaking) to first compute if the option is
set and then fnmatch than the inverse. This way we can avoid
unnecessary fnmatch.
2021-02-06 17:31:03 +00:00
Omar Polo
6abda252e9
added `block return'' and
`strip'' options
2021-02-06 17:22:37 +00:00
Omar Polo
daac4a9452
fix auto index precedence
2021-02-06 14:36:26 +00:00
Omar Polo
4125c94fda
make sure @ is allowed, and rephrase another test
2021-02-06 13:57:12 +00:00
Omar Polo
52053e1a61
ensure CGI stdout it's blocking
2021-02-06 09:56:34 +00:00
Omar Polo
19e7bd00a3
[iri] accept also : and @
...
again, to be RFC3986 compliant.
2021-02-06 09:33:48 +00:00
Omar Polo
8404ec301f
don't %-decode the query
2021-02-05 14:31:53 +00:00
Omar Polo
709f4c9447
alter the string, don't advance pointer
...
if we advance the pointer, we crash during reload due to an invalid
address given to free. altering the string is the way.
2021-02-04 20:04:12 +00:00
Omar Polo
102d2e9cce
missing argument for LOGI
2021-02-04 18:09:42 +00:00
Omar Polo
9543e3fbaf
avoid race-condition
...
what if we receive a SIGHUP right after unblock_signal (or during the
whole block_signals...unblock_signals) but *before* the wait_sighup?
Yeah.
2021-02-04 18:09:30 +00:00
Omar Polo
38d4db740d
improve manpage
2021-02-04 14:38:37 +00:00
Omar Polo
fe90d24fd0
add compat for setproctitle
...
This adds a check for setproctitle and for the (linux) prctl
PR_SET_NAME. If setproctitle is not available, on linux we provide an
implementation that use prctl (taken from tmux compat layer.)
2021-02-04 13:42:35 +00:00
Omar Polo
86edc4f400
mention configuration reload
2021-02-04 13:34:43 +00:00
Omar Polo
3007f56596
mention SIGHUP in manpage
2021-02-04 13:34:27 +00:00
Omar Polo
ca21e10043
reload configuration on SIGHUP
2021-02-04 13:23:15 +00:00
Omar Polo
1e3ef7ab4f
use upper bound given by poll
...
it's a waste to loop through all fds. We know the *exact* number of
clients that needs attention, so use that information to limit the
looping.
2021-02-03 21:14:48 +00:00
Omar Polo
e824d03efa
drop unnecessary check around close
2021-02-03 16:53:34 +00:00
Omar Polo
4e2e2ab1d3
refactor executor_main
...
now it's symmetrical to listener_main().
2021-02-03 16:37:53 +00:00
Omar Polo
d672b8fba1
refactoring startup logic
2021-02-03 16:28:00 +00:00
Omar Polo
9b8f5ed2c0
revert commit 346f28eeaa
...
keep mark_nonblock in utils.c, as otherwise the build for the regress
suite will fail (mark_nonblock needs fatal which is in gmid.c, and
we can't link gmid.o with the regress suite...)
2021-02-03 14:16:39 +00:00
Omar Polo
9edb828251
drop privileges after the fork
2021-02-03 14:13:32 +00:00
Omar Polo
4ee08bd148
fix location example
2021-02-03 14:01:00 +00:00
Omar Polo
346f28eeaa
move mark_nonblock to utils.c
2021-02-02 23:03:33 +00:00
Omar Polo
fe40638928
mark various functions as static
...
By marking all those function as static, the compiler is free to do
more optimizations. In addition, those functions are not used outside
server.c
2021-02-02 23:01:09 +00:00
Omar Polo
87f2b68b58
cgi now follows globbing rules
2021-02-02 22:38:35 +00:00
Omar Polo
5b4a641893
let LEX and YACC be customizable via args
2021-02-02 09:58:05 +00:00
Omar Polo
b1d52c3105
ignore clangd' compile_flags.txt
2021-02-02 09:55:11 +00:00
Omar Polo
5f715ce43f
print the header in the directory listing
2021-02-02 09:48:32 +00:00
Omar Polo
3c680bddab
configless: fixing the case of the implicit "."
...
I got bitten by the scope visibility rules. After the end of the
block, the path variable is no longer valid, and in fact later
load_vhosts fails to open that (because the buffer gets invalidated)
2021-02-02 09:30:24 +00:00