History log of /lighttpd1.4/src/buffer.h (Results 1 – 25 of 89)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: lighttpd-1.4.69, lighttpd-1.4.68, lighttpd-1.4.67, lighttpd-1.4.66
# 91ce3b08 10-Jun-2022 Glenn Strauss <[email protected]>

[core] buffer_append_bs_escaped_json()

separate func from buffer_append_bs_escaped() so that both
buffer_append_bs_escaped() and buffer_append_bs_escaped_json()
can be slightly more specialized and

[core] buffer_append_bs_escaped_json()

separate func from buffer_append_bs_escaped() so that both
buffer_append_bs_escaped() and buffer_append_bs_escaped_json()
can be slightly more specialized and optimized

show more ...


Revision tags: lighttpd-1.4.65
# d22e88b7 08-May-2022 Glenn Strauss <[email protected]>

[core] buffer_append_bs_escaped()

move accesslog_append_escaped() to buffer_append_bs_escaped()
replace buffer_append_string_encoded_json()


# f70409d2 02-May-2022 Glenn Strauss <[email protected]>

[core] buffer_append_char() convenience func


Revision tags: lighttpd-1.4.64
# 51e141c8 07-Jan-2022 Glenn Strauss <[email protected]>

[multiple] remove buffer_init_buffer()

remove (minor) convenience func; easy to replace

Like buffer_init_string(), buffer_init_buffer() was used in only a few
places at startup or in cold funcs, so

[multiple] remove buffer_init_buffer()

remove (minor) convenience func; easy to replace

Like buffer_init_string(), buffer_init_buffer() was used in only a few
places at startup or in cold funcs, so better off removed from buffer.c

show more ...


# bade1c03 07-Jan-2022 Glenn Strauss <[email protected]>

[multiple] remove buffer_init_string()

remove (minor) convenience func; easy to replace


Revision tags: lighttpd-1.4.63, lighttpd-1.4.62
# e1ff1cc8 17-Nov-2021 Glenn Strauss <[email protected]>

[core] buffer_append_string_encoded_json()


Revision tags: 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
# b38817b6 17-Sep-2021 Glenn Strauss <[email protected]>

[core] mark attr malloc, returns nonnull

mark some core code with attributes malloc, returns nonnull


# 1cd73b08 15-Jun-2021 Glenn Strauss <[email protected]>

[core] move backtrace and assert macros to ck.[ch]


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

[multiple] buffer_copy_string_len_lc()

convenience wrapper combining
buffer_copy_string_len()
buffer_to_lower()
and making a single pass over string


# db4af125 10-Jun-2021 Glenn Strauss <[email protected]>

[core] add iovec wrappers to sys-crypto-md.h


# 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 ...


# e110b062 22-May-2021 Glenn Strauss <[email protected]>

[multiple] http_auth_digest_hex2bin -> li_hex2bin

move http_auth.c:http_auth_digest_hex2bin() to buffer.c:li_hex2bin()
for reuse, e.g. for use by mod_secdownload, which is not mod_auth*


# 980554bc 08-May-2021 Glenn Strauss <[email protected]>

[core] simplify buffer_path_simplify()


# f7bcc833 07-May-2021 Glenn Strauss <[email protected]>

[core] buffer_is_equal_string -> buffer_eq_slen


# 1aae63af 07-May-2021 Glenn Strauss <[email protected]>

[core] remove buffer_is_equal_right_len()

(not widely used or widely useful)


# 680e6b3b 25-Mar-2021 Glenn Strauss <[email protected]>

[multiple] buffer_copy_path_len2() aggregate


# cfc8eeb5 25-Mar-2021 Glenn Strauss <[email protected]>

[core] mark select buffer.[ch] funcs attr nonnull


# e7464bab 25-Mar-2021 Glenn Strauss <[email protected]>

[core] buffer_append_* aggregates

buffer_append_str2()
buffer_append_str3()
buffer_append_iovec()


# 38c87358 16-Mar-2021 Glenn Strauss <[email protected]>

[multiple] optimize primitives, buffer_extend()

optimize buffer_* primitives

Other than buffer_string_set_length(), reallocate with one power-2 step
in size (or use the requested size, if larger).

[multiple] optimize primitives, buffer_extend()

optimize buffer_* primitives

Other than buffer_string_set_length(), reallocate with one power-2 step
in size (or use the requested size, if larger). This replaces the fixed
BUFFER_PIECE_SIZE round-up of only 64 bytes extension each reallocation,
which could lead to excessive reallocations in some scenarios.

buffer_extend() convenience routine to prep for batch append
(combines buffer_string_prepare_append() and buffer_commit())

mod_fastcgi, mod_scgi, mod_proxy and others now leverage buffer_extend()

mod_scgi directly performs little-endian encoding of short ints

http_response_write_header() optimizes writing response header,
leveraging buffer_extend()

modify mod_proxy to append line ends
similar to how it is done in http_response_write_header()
(removes one call to buffer_append_string_len())

show more ...


# 81ef66ea 15-Mar-2021 Glenn Strauss <[email protected]>

[multiple] buffer_has_slash_suffix()

buffer_has_slash_suffix()
buffer_has_pathsep_suffix()


# 19bc8885 15-Mar-2021 Glenn Strauss <[email protected]>

[multiple] add attrs from gcc -Wsuggest-attribute=


# 006c5efc 12-Mar-2021 Glenn Strauss <[email protected]>

[core] optimize buffer_urldecode_path()

remove buffer_urldecode_query() (unused)
query string generally needs to be split on '&'
before decoding '+' and decoding %-encoding

remove int2hex() (unused

[core] optimize buffer_urldecode_path()

remove buffer_urldecode_query() (unused)
query string generally needs to be split on '&'
before decoding '+' and decoding %-encoding

remove int2hex() (unused, and not well-named for nibble-to-hex)

show more ...


# b9e1e93f 06-Mar-2021 Glenn Strauss <[email protected]>

[core] http_cgi_encode_varname()

move and rename from buffer.c to http_cgi.c:
buffer_copy_string_encoded_cgi_varnames() -> http_cgi_encode_varname()


Revision tags: lighttpd-1.4.59
# 21f0dabe 07-Jan-2021 Glenn Strauss <[email protected]>

[multiple] replace buffer_is_equal_caseless_string

buffer_is_equal_caseless_string() -> buffer_eq_icase_slen()


1234