Glenn Strauss
d5fd52ee86
[core] separate log_error_open* funcs
...
separate log_error_open* funcs to open breakagelog, filename, syslog
2 years ago
Glenn Strauss
6c1d57a29a
[core] store log filename in (log_error_st *)
2 years ago
Glenn Strauss
ca97505a72
[multiple] store srv->tmp_buf in tb var
...
rather than using srv->tmp_buf directly in code modifying temp buf (tb)
2 years ago
Glenn Strauss
68d8d4c532
[multiple] stat_cache singleton
2 years ago
Glenn Strauss
b5775b9951
[multiple] reduce direct use of srv->errh
2 years ago
Glenn Strauss
c8cd7cf49b
[multiple] extern log_epoch_secs
...
replace srv->cur_ts
2 years ago
Glenn Strauss
409bba80b1
[multiple] reduce direct use of srv->cur_ts
2 years ago
Glenn Strauss
f24e6d696a
[multiple] plugin_stats array
...
use global rather than passing around (server *) just for that
li_itostrn() and li_utostrn() return string length
(rather than requiring subsequent strlen() to find length)
2 years ago
Glenn Strauss
0fcd51438d
[core] create http chunk header on the stack
...
streamline code in http_chunk.c
2 years ago
Glenn Strauss
010c28949c
[multiple] prefer (connection *) to (srv *)
...
convert all log_error_write() to log_error() and pass (log_error_st *)
use con->errh in preference to srv->errh (even though currently same)
avoid passing (server *) when previously used only for logging (errh)
2 years ago
Glenn Strauss
24680a9142
[core] array_init() arg for initial size
2 years ago
Glenn Strauss
5977ce2b4a
[core] isolate use of data_config, configfile.h
2 years ago
Glenn Strauss
ba88ff0e93
[core] run all trigger and sighup handlers
...
(do not bail if a handler returns something other than HANDLER_GO_ON)
(preserve fn signature for simplicity and compat with plugin_fn_data)
2 years ago
Glenn Strauss
65ef0a3d69
[core] collect more config logic into configfile.c
2 years ago
Glenn Strauss
ed62e354ff
[core] use config_plugin_values_init()
2 years ago
Glenn Strauss
d7a6a7a263
[core] (const buffer *) from strftime_cache_get()
2 years ago
Glenn Strauss
e2de4e581e
[core] const char *name in struct plugin
...
put void *data (always used) as first member of struct plugin
add int nconfig member to PLUGIN_DATA
calloc() inits p->data to NULL
2 years ago
Glenn Strauss
78cf61b152
[core] streamline config_check_cond()
...
avoid passing srv; use con->srv when needed
2 years ago
Glenn Strauss
ad9b7e009b
[core] inline buffer as part of DATA_UNSET key
...
(instead of key being (buffer *))
2 years ago
Glenn Strauss
5d9bfc9a76
[core] remove unused members of struct server
2 years ago
Glenn Strauss
62e97967ca
[core] prefer uint32_t to size_t in base.h
...
even 2 billion is way larger than even extreme operating values
expected for the members in base.h
include some structs directly in struct server, rather than by ptr
2 years ago
Glenn Strauss
9858051d03
[core] remove srv->split_vals
2 years ago
Niclas Rosenvik
8c9b5480f3
[core] Solaris has getloadavg in sys/loadavg.h
...
SunOS/Solaris/Illumos has getloadavg declared in sys/loadavg.h .
github: closes #101
2 years ago
Glenn Strauss
670b2086f8
[core] move con state handling to connections*.c
...
move maint code from server.c to connections.c
3 years ago
Glenn Strauss
b1cc0856d2
[core] fdevent_poll() is effective periodic timer
...
document that USE_ALARM in server.c is not used
3 years ago
Glenn Strauss
1cf68f79eb
[core] behavior change: stricter URL normalization
...
behavior change: stricter URL normalization
Prior behavior can be obtained by configuring lighttpd.conf with:
server.http-parseopts = (“url-normalize” => “disable” )
although this is not recommended.
This behavior change was pre-announced with the releases of
lighttpd 1.4.52 (2018.11.28)
lighttpd 1.4.53 (2019.01.27)
The recommended settings are:
server.http-parseopts = (
"header-strict" => "enable",
"host-strict" => "enable",
"host-normalize" => "enable",
"url-normalize" => "enable",
"url-normalize-unreserved" => "enable",
"url-normalize-required" => "enable",
"url-ctrls-reject" => "enable",
"url-path-2f-decode" => "enable",
"url-path-backslash-trans" => "enable",
"url-path-dotseg-remove" => "enable",
"url-query-20-plus" => "enable"
)
The lighttpd defaults with this commit are slightly less strict:
server.http-parseopts = (
"header-strict" => "enable",
"host-strict" => "enable",
"host-normalize" => "enable",
"url-normalize" => "enable",
"url-normalize-unreserved" => "enable",
#"url-normalize-required" => "enable",
"url-ctrls-reject" => "enable",
"url-path-2f-decode" => "enable",
#"url-path-backslash-trans" => "enable",
"url-path-dotseg-remove" => "enable",
#"url-query-20-plus" => "enable"
)
3 years ago
Glenn Strauss
f1e9bcb08a
[core] new worker_init hook to follow parent fork
3 years ago
Glenn Strauss
cbad7517c8
[core] struct log_error_st for error logging
3 years ago
Glenn Strauss
37bd124ae4
[core] pass conf.follow_symlink in more places
3 years ago
Glenn Strauss
9113011d5b
[core] pass (fdnode *) for registered fdevent fd
...
inline fdevent_fdnode_interest()
avoid array lookup for (fdnode *) for various ops
3 years ago
Glenn Strauss
41384a3657
[core] isolate fdevent processing
3 years ago
Glenn Strauss
1a99aad1c0
[core] pull server load checks out of main loop
3 years ago
Glenn Strauss
800e9b7349
[core] remove fde_ndx member outside fdevents
...
(isolated to fdevent framework internals)
3 years ago
Glenn Strauss
f5f221eda8
[core] dispatch events from within event framework
...
event framework now calls interface to dispatch events rather than
itself implementing multiple interfaces for fdevent_process() to
be able to dispatch events generically.
3 years ago
Glenn Strauss
79aa8613e1
[core] store joblist pointer on stack
3 years ago
Glenn Strauss
c8f9658536
[core] remove server.h
3 years ago
Glenn Strauss
aa2d0fb087
[core] srv->max_fds_lowat and srv->max_fds_hiwat
3 years ago
Glenn Strauss
653b0dac7c
[core] fdevent_process()
...
process fdevents in fdevent.c
3 years ago
Glenn Strauss
aa34dfd32b
[core] some server_main_loop() cleanup
3 years ago
Glenn Strauss
fb9b8ad8ae
[core] mark startup/shutdown funcs cold
3 years ago
Glenn Strauss
413c0e557e
[core] separate server_main_loop() func, mark hot
...
move server main loop into separate func and mark hot
separate funcs for signal handling
3 years ago
Glenn Strauss
ce7b47c015
[core] systemd socket activation support
3 years ago
Glenn Strauss
06ebbc3ed4
[core] invert logic for mod_indexfile load warning
4 years ago
Glenn Strauss
a7bceb6b06
[core] quiet indexfile warning if mod not loaded
4 years ago
Glenn Strauss
0bac13f6b4
[core] cygwin sample to run lighttpd under NSSM
...
configure NSSM to set environment variables when starting lighttpd
NSSM_SERVICE_NAME=lighttpd
NSSM_SERVICE_DIR=/lighttpd/install/dir (optional)
4 years ago
Glenn Strauss
f69bd9cdb8
[core] perf: simple, quick buffer_clear()
...
quickly clear buffer instead of buffer_string_set_length(b, 0) or
buffer_reset(b). Avoids free() of large buffers about to be reused,
or buffers that are module-scoped, persistent, and reused.
(buffer_reset() should still be used with buffers in connection *con
when the data in the buffers is supplied by external, untrusted source)
4 years ago
Glenn Strauss
cc1c2f0e37
[core] server.compat-module-load = "disable"
...
controls whether default and compatibility modules are loaded,
including default modules mod_indexfile, mod_staticfile, mod_dirlisting
and if mod_authn* modules are loaded when mod_auth in server.modules
and if mod_openssl is loaded when ssl. directives are seen
default: server.compat-module-load = "enable"
(preserve existing behavior)
recommended config: explicitly load desired modules in desired order
4 years ago
Glenn Strauss
fccc7fc607
[core] perf: chunk.c chunk pool
...
reuse chunks across chunkqueues; remove cq->unused, cq->unused_chunks
reuse same buffer c->mem and c->file.name in chunk
4 years ago
Glenn Strauss
368630d925
[TLS] sys-crypto.h abstraction
4 years ago
Glenn Strauss
8c7f1dfb03
[core] more memory-efficient fn table for data_*
...
save 40 bytes (64-bit), or 16 bytes (32-bit) per data_* element
at the cost of going through indirect function pointer to execute
methods. At runtime, the reset() method is most used among them.
4 years ago