o avoid dying in daemon mode for some uncommon, but recoverable, errors
o close leaking file descriptors for CGI and daemon mode
o handle poll errors properly
o don't try to handle more than one request per process yet
this covers PR#38489 and PR#40079, as well some some issues reported
privately.
o make bozohttpd internally more modular, preparing the way
to handle more than one request per process
o fix http-auth, set $REMOTE_USER not $REMOTEUSER. also fix
cgi-bin with cvsweb, from Holger Weiss <holger@CIS.FU-Berlin.DE>
o fix an uninitialised variable use in daemon mode
o fix ssl mode with newer OpenSSL
o mmap large files in manageable sizes so we can serve any size file
o refactor url processing to handle query strings correctly for CGI
from Sergey Katsev at Coyote Point
o add If-Modified-Since support, from Joerg Sonnenberger
<joerg@netbsd.org>
o many more manual fixes, from NetBSD
both the "data" and "prefix" elements are identical. For example, the
two lines
amiga/boot (8) - system bootstrapping procedures
amd64/boot (8) - system bootstrapping procedures
both appear with data = "boot (8) - system bootstrapping procedures" but
with different values for prefix, and we do not want to reject one of
them as a duplicate.
1) Fix an issue where because of the reordering of transform_request
and process_cgi, the cgi-script name was being cut off
by one character (transform_request for some reason
cuts off the leading '/' for the file name as part of its
processing). As an 'easy' fix, simply re-add the '/' to the
front of the filename, which means that we don't have to
mess with the logic that sometimes adds +1 and sometimes doesn't.
2) Work around ridiculous bug in PHP reported by lukem in 2004,
but stubbornly never fixed by the PHP maintainers:
Change the SCRIPT_NAME and SCRIPT_FILENAME variables
to contain the file name only, not the query if one exists.
Having the query in SCRIPT_FILENAME causes php-cgi to not
work, as per the bug information here:
http://bugs.php.net/bug.php?id=28227
3) Fix a memory leak because URL wasn't being freed.
CGI handling, including bin/40355 . There are two main changes here:
1) call process_cgi() after transform_request(), not before. Now it is
possible to have a default cgi handler catch a request for a path that
was produced by transformation, e.g. by index generation -- so now the
index can be "generated" by a CGI if that is what the user desires.
2) More clearly distinguish "file" from "query" portions of the request
URL, so we do not feed ?-suffixed "arguments" to plain files, fail to
match filename extensions due to ?-suffixes, etc.
After this change, there are only two cases which use the "query"
portion of the request (the portion after the ?):
a) A redirect issued by HTTPD will redirect to the new file, but
with the same query string.
b) process_cgi() will, of course continue to use the query string.