Commit Briefs

Omar Polo

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.


Omar Polo

BUFSIZ is variable, we need *exactly* 1024

Using BUFSIZ in sbuf is not OK. It's variable, and in various places we assume that sbuf is 1024 (like handle_cgi_reply). We could patch those, but we aren't sure BUFSIZ is >= 1024! Let's keep the hardcoded number. (found by debugging on arch on amd64, where BUFSIZ is bigger)


Omar Polo

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




Omar Polo

rewrite main loop using libevent




Omar Polo

improve logs management


Omar Polo

added prefork option


Omar Polo

add the ``entrypoint'' option



Omar Polo

reload configuration on SIGHUP


Omar Polo

refactor executor_main

now it's symmetrical to listener_main().


Omar Polo

refactoring startup logic