note: etag buffer etag->ptr might be NULL (etag->used = etag->sze = 0)
so buffer will need to be extended, not truncated, in that case.
buffer_string_set_length() is typically used to truncate strings.
reset stek_rotate_ts if clock moves backwards > 28800 seconds
x-ref:
"Lighttpd 1.4.58 SSL connections stop working if system time of lighttpd server is changed to future one (+12h or even days)"
https://redmine.lighttpd.net/issues/3080
(mod_auth_api.c would be part of mod_auth.c
and mod_vhostdb_api.c would be part of mod_vhostdb.c
if not for MacOS)
MacOS modules can link against .dylib, but not against other modules
MacOS link with -module produces a .so, which lighttpd uses
MacOS link without -module procudes a .dylib,
but name *must* have prefix "lib...",
which lighttpd "mod_*" do not have.
Other lighttpd build configs (CMake, SCONS, meson) might not work
on MacOS. Patches (which do not make a huge mess of things) welcome.
When writev() is available, always use writev() instead of write()
(Silently ignores config option to use write() if writev() is available)
(Still uses sendfile() instead of writev() when config selects sendfile)
link http_auth.c into mod_auth
link http_vhostdb.c into mod_vhostdb
ensure that mod_auth loads before mod_authn_*
ensure that mod_vhostdb loads before mod_vhostdb_*
move native data_* types into array.c
(the types are already declared in array.h)
The array data structure remains extendable, as is done with data_config
(configfile) and data_auth (mod_auth), though array data structure
primary uses are at startup (config time) and header parsing. The
insertion logic into sorted list can be expensive for large lists,
so header parsing might choose a different data structure in the future.
no need for extra work for precision allocation to avoid 0-3 extra chars
note: callers passing precise buffer size for without padding will need
to be modified to pass a slightly larger buffer, e.g. mod_secdownload
When lighttpd is not configured to stream the response body,
lighttpd sends partial content with an incorrect Content-Length
to an HTTP/1.0 client if a backend sends Transfer-Encoding: chunked
in response to lighttpd HTTP/1.1 request (to backend), and the response
from the backend ends up truncated.
lighttpd could instead send an HTTP/1.0 502 Bad Gateway, but the
current implementation chooses to send the partial content. After all,
an HTTP/1.0 client is, well, HTTP/1.0, and so of limited intelligence.
remove http_chunk_append_file() and http_chunk_append_file_range()
callers should choose to use stat_cache_entry_open() for caching
or should open file and check sizes and ranges