Delay calling do_log until just before emitting the response. This avoids
calling do_log before potentially handing control to the static-index
handler, which also calls do_log.
care has to be taken when splitting the host into SERVER_NAME and SERVER_PORT,
as ipv6 uses : in the host part. also do it consistently, the host can be set
thru the request uri and the host header.
set REMOTE_USER to empty string to prevent accidents.
we do not handle chunked transfer encoding, just assuming the client doesnt
do keep alive is wrong. we have to reject the post when the client tries
chunked post with 411 "Length required" error.
The mode printed under the -l option contains 11 characters,
interpreted as follows: the first character is
d if the entry is a directory;
a if the entry is an append-only file;
- if the entry is a plain file.
Therefore, handle them in automatically generated directory listings.