History log of /lighttpd1.4/src/mod_magnet_cache.c (Results 1 – 25 of 33)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: lighttpd-1.4.69, lighttpd-1.4.68
# 5e14db43 10-Dec-2022 Glenn Strauss <[email protected]>

[multiple] employ ck_calloc, ck_malloc shared code

employ ck_calloc(), ck_malloc() shared code to slightly reduce code size
(centralize the ck_assert() to check that memory allocation succeeded)


# c412bb59 08-Dec-2022 Glenn Strauss <[email protected]>

[multiple] employ ck_realloc_u32() shared code

employ ck_realloc_u32() shared code to slightly reduce code size


Revision tags: lighttpd-1.4.67, lighttpd-1.4.66, lighttpd-1.4.65
# ce360dc6 16-Feb-2022 Glenn Strauss <[email protected]>

[mod_magnet] clear stack when reloading script


# d0273c8a 09-Feb-2022 Glenn Strauss <[email protected]>

[mod_magnet] defer req_env init unless needed

defer req_env initialization unless req_env might be needed by script


Revision tags: lighttpd-1.4.64, lighttpd-1.4.63, lighttpd-1.4.62, lighttpd-1.4.61
# 575665ad 05-Oct-2021 Glenn Strauss <[email protected]>

[multiple] __attribute_nonnull__ now takes params

define __attribute_nonnull__(params) with params to match
recent changes in glibc development (targetting glibc 2.35 in Feb 2022)

x-ref:
new __at

[multiple] __attribute_nonnull__ now takes params

define __attribute_nonnull__(params) with params to match
recent changes in glibc development (targetting glibc 2.35 in Feb 2022)

x-ref:
new __attribute_nonnull__(params) conflicts with third-party
https://sourceware.org/bugzilla/show_bug.cgi?id=28425

show more ...


Revision tags: lighttpd-1.4.60
# a3e9faa4 09-Sep-2021 Glenn Strauss <[email protected]>

[multiple] quiet coverity warnings


# 34747957 05-Aug-2021 Glenn Strauss <[email protected]>

[mod_magnet] reuse lighty lua table

reuse lighty lua table; leave on stack
reset response tables lighty.header[] and lighty.content[] each request


# 9a2404ce 13-Jul-2021 Glenn Strauss <[email protected]>

[core] quiet compiler warnings

cast away signedness warning in request_check_hostname()
mod_gnutls https_add_ssl_client_entries crts allocated if crt_size != 0
(which is already checked earlier in

[core] quiet compiler warnings

cast away signedness warning in request_check_hostname()
mod_gnutls https_add_ssl_client_entries crts allocated if crt_size != 0
(which is already checked earlier in routine)

report from FaceBook Infer static analysis tool (https://fbinfer.com/)
- quiet dead store warnings
- check return != NULL from allocation funcs

show more ...


# 4e5b822b 15-Jun-2021 Glenn Strauss <[email protected]>

[mod_magnet] cache script objects at config time

always check at least mtime and size to trigger script reload


# 2d898bf9 09-Jun-2021 Glenn Strauss <[email protected]>

[mod_magnet] sync script load w/ stat_cache

read file and use luaL_loadbuffer()
eliminate TOC-TOU race w/ independent stat() in stat_cache_get_entry()

restructure script_cache_get_script() into sma

[mod_magnet] sync script load w/ stat_cache

read file and use luaL_loadbuffer()
eliminate TOC-TOU race w/ independent stat() in stat_cache_get_entry()

restructure script_cache_get_script() into smaller funcs

show more ...


# e86dba54 09-Jun-2021 Glenn Strauss <[email protected]>

[mod_magnet] inline name and etag buffers in cache

also mark cache init and cache free funcs as cold


# af3df29a 09-Jun-2021 Glenn Strauss <[email protected]>

[multiple] reduce redundant NULL buffer checks

This commit is a large set of code changes and results in removal of
hundreds, perhaps thousands, of CPU instructions, a portion of which
are on hot co

[multiple] reduce redundant NULL buffer checks

This commit is a large set of code changes and results in removal of
hundreds, perhaps thousands, of CPU instructions, a portion of which
are on hot code paths.

Most (buffer *) used by lighttpd are not NULL, especially since buffers
were inlined into numerous larger structs such as request_st and chunk.

In the small number of instances where that is not the case, a NULL
check is often performed earlier in a function where that buffer is
later used with a buffer_* func. In the handful of cases that remained,
a NULL check was added, e.g. with r->http_host and r->conf.server_tag.

- check for empty strings at config time and set value to NULL if blank
string will be ignored at runtime; at runtime, simple pointer check
for NULL can be used to check for a value that has been set and is not
blank ("")
- use buffer_is_blank() instead of buffer_string_is_empty(),
and use buffer_is_unset() instead of buffer_is_empty(),
where buffer is known not to be NULL so that NULL check can be skipped
- use buffer_clen() instead of buffer_string_length() when buffer is
known not to be NULL (to avoid NULL check at runtime)
- use buffer_truncate() instead of buffer_string_set_length() to
truncate string, and use buffer_extend() to extend

Examples where buffer known not to be NULL:
- cpv->v.b from config_plugin_values_init is not NULL if T_CONFIG_BOOL
(though we might set it to NULL if buffer_is_blank(cpv->v.b))
- address of buffer is arg (&foo)
(compiler optimizer detects this in most, but not all, cases)
- buffer is checked for NULL earlier in func
- buffer is accessed in same scope without a NULL check (e.g. b->ptr)

internal behavior change:
callers must not pass a NULL buffer to some funcs.
- buffer_init_buffer() requires non-null args
- buffer_copy_buffer() requires non-null args
- buffer_append_string_buffer() requires non-null args
- buffer_string_space() requires non-null arg

show more ...


# 13ea2d88 28-Apr-2021 Glenn Strauss <[email protected]>

[core] consistent inclusion of sys-time.h


# dde9df43 17-Mar-2021 Glenn Strauss <[email protected]>

[multiple] mark addtl funcs attr returns_nonnull


# dbe3e236 11-Mar-2021 Glenn Strauss <[email protected]>

[multiple] prefer monotonic time for internal use

Note: monotonic time does not change while VM is suspended

Continue to use real time where required by HTTP protocol, for logging
and for other use

[multiple] prefer monotonic time for internal use

Note: monotonic time does not change while VM is suspended

Continue to use real time where required by HTTP protocol, for logging
and for other user-visible instances, such as mod_status, as well as for
external databases and caches.

show more ...


Revision tags: lighttpd-1.4.59, lighttpd-1.4.58, lighttpd-1.4.57, lighttpd-1.4.56, lighttpd-1.4.56-rc7, lighttpd-1.4.56-rc6, lighttpd-1.4.56-rc5, lighttpd-1.4.56-rc4, lighttpd-1.4.56-rc3, lighttpd-1.4.56-rc2, lighttpd-1.4.56-rc1, lighttpd-1.4.55
# 68d8d4c5 05-Dec-2019 Glenn Strauss <[email protected]>

[multiple] stat_cache singleton


# 50bdb55d 26-Nov-2019 Glenn Strauss <[email protected]>

[multiple] connection hooks no longer get (srv *)

(explicit (server *) not passed; available in con->srv)


# ed62e354 16-Nov-2019 Glenn Strauss <[email protected]>

[core] use config_plugin_values_init()


# 84ccd87b 26-Oct-2019 Glenn Strauss <[email protected]>

[mod_magnet] use config_plugin_values_init()


Revision tags: lighttpd-1.4.54
# d28bac32 13-Feb-2019 Glenn Strauss <[email protected]>

[multiple] reduce code dup in list resizing

reduce code duplication in list resizing
realloc() of NULL ptr has behavior similar to malloc()

Note that if initial size == 0, then code used to adjust

[multiple] reduce code dup in list resizing

reduce code duplication in list resizing
realloc() of NULL ptr has behavior similar to malloc()

Note that if initial size == 0, then code used to adjust size
must be += x to ensure the size is non-zero for reallocation.
(Multiplying 0 * x, e.g. power-2 resizing, will result in 0.)

show more ...


Revision tags: lighttpd-1.4.53, lighttpd-1.4.52, lighttpd-1.4.51, lighttpd-1.4.50
# 04d76e7a 25-Mar-2018 Glenn Strauss <[email protected]>

[core] some header cleanup

provide standard types in first.h instead of base.h
provide lighttpd types in base_decls.h instead of settings.h
reduce headers exposed by headers for core data structures

[core] some header cleanup

provide standard types in first.h instead of base.h
provide lighttpd types in base_decls.h instead of settings.h
reduce headers exposed by headers for core data structures
do not expose <pcre.h> or <stdlib.h> in headers
move stat_cache_entry to stat_cache.h
reduce use of "server.h" and "base.h" in headers

show more ...


Revision tags: lighttpd-1.4.49
# b1df38ab 03-Feb-2018 Glenn Strauss <[email protected]>

[core] increase stat_cache abstraction

reduce dependency on struct connection
routines for getting/caching content_type and etag separate from stat


Revision tags: lighttpd-1.4.48, lighttpd-1.4.47, lighttpd-1.4.46
# a53f662a 24-Mar-2017 Glenn Strauss <[email protected]>

[core] remove some unused header includes

remove exposure of stdio.h in buffer.h for print_backtrace(), now static


Revision tags: lighttpd-1.4.45, lighttpd-1.4.44, lighttpd-1.4.43
# ac90699d 17-Oct-2016 Glenn Strauss <[email protected]>

[autobuild] rm module stub code for missing deps

remove module stub code since the build system(s) no longer build any
module when the dependencies for a given module are not present.


Revision tags: lighttpd-1.4.42, lighttpd-1.4.41, lighttpd-1.4.40
# 8abd06a7 19-Mar-2016 Glenn Strauss <[email protected]>

consistent inclusion of config.h at top of files (fixes #2073)

From: Glenn Strauss <[email protected]>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3113 152afb58-edef-03

consistent inclusion of config.h at top of files (fixes #2073)

From: Glenn Strauss <[email protected]>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3113 152afb58-edef-0310-8abb-c4023f1b3aa9

show more ...


12