hedley is a single header to handle compiler-specific features:
https://nemequ.github.io/hedley/
Prefer headly macros over glib for now.
Change-Id: I3c67ebee0d43e27fde6402d47788e1045144e864
Even if they shouldn't (due to HTTP/1.0 or Connection; close) some
backends send HTTP/1.1 without Connection: close, and use Content-Length
to signal end of response (and don't close the connection, as they wait
for another request).
Now Content-Length is used to find the end of the response (chunked
transfer-encoding was already supported).
mod_proxy now signals HTTP/1.1, but also sends "Connection: close": it
doesn't reuse the connection yet.
Change-Id: Ica0c9b3b7da79899412a746f21e7348ccd3d23ee
readdir_r is deprecated in glibc due to serious memory handling issues
in the API: one cannot pass the size of the allocated dirent.
glibc authors claims readdir is thread-safe in modern implementations,
and expect POSIX to require it in a future version.
No way to check whether readdir is thread-safe though :(
("thread-safe" in this context means different directory streams, which
is good enough.)
Also remove li_dirent_buf_size.
Change-Id: Ia5eae3327e97dc4b0751fb2604ea21c0ce09a5f9
* print alerts with numerical value
* show non-fatal alerts
* use log level info for all alerts
* use log level warning for non-fatal "unknown" errors
Change-Id: Ibaa33743bfe809579981fdeb121955ef5c6d0ab2
* no more hash values - only lists and list of key-value pairs
* "master" config:
the config loaded on startup can use all features,
configs loaded later (vhost on demand from sql...) can't use
include* and cannot modify global vars.
* scoped variables
- add a global var store in the server struct
- global vars can be set with "global foo = bar"
- if a variable already exists in a scope it will be modified on a
write, otherwise a new local variable is created
- global vars won't be modified if not in "master" mode
- vars can be made explicitly local with "local foo = bar"; create a
local copy with "local foo = foo"
- globals vars are available in live config loads for reading
- each file and action block {...} creates a new scope; if/else branches do
NOT create a new scope
* to append a value to a list use "l + [v]" (not "l + v" anymore);
lists are concatenated with "+"
* [...] always marks a list
* (...) is a list if it contains a "," or "=>", otherwise it justs
groups an expression
* a list can either contain key-value pairs or other values. mixing is
not allowed
* should be more robust now: taking list of wanted value, handling NULL
pointers instead of value type NONE, fixed some bugs (wrong checks,
mem leaks, ...)
* add many methods to make handling of values easier; most methods
can handle NULL value pointers safely (li_value_type(v) instead of
v->type and so on)