History log of /lighttpd1.4/src/mod_scgi.c (Results 1 – 25 of 193)
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)


# b82d7b8a 06-Dec-2022 Glenn Strauss <[email protected]>

[multiple] mark mod_*_plugin_init() funcs cold


Revision tags: lighttpd-1.4.67, lighttpd-1.4.66, lighttpd-1.4.65
# 2a7d3a27 10-May-2022 Glenn Strauss <[email protected]>

[multiple] rename status_counter -> plugin_stats


# f2610d23 03-May-2022 Glenn Strauss <[email protected]>

[multiple] use buffer_append_char()


Revision tags: lighttpd-1.4.64, lighttpd-1.4.63, lighttpd-1.4.62, lighttpd-1.4.61, lighttpd-1.4.60
# 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 ...


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


# c95f832f 05-Mar-2021 Glenn Strauss <[email protected]>

[core] http_cgi.[ch] CGI interfaces (RFC 3875)

collect Common Gateway Interface (CGI) interfaces (RFC 3875)


Revision tags: lighttpd-1.4.59, lighttpd-1.4.58, lighttpd-1.4.57, lighttpd-1.4.56
# 291fd1e7 10-Nov-2020 Glenn Strauss <[email protected]>

[core] accept "HTTP/2.0", "HTTP/3.0" from backends (#3031)

accept "HTTP/2.0" and "HTTP/3.0" NPH from naive non-proxy backends

(thx flynn)

x-ref:
"uwsgi fails with HTTP/2"
https://redmine.light

[core] accept "HTTP/2.0", "HTTP/3.0" from backends (#3031)

accept "HTTP/2.0" and "HTTP/3.0" NPH from naive non-proxy backends

(thx flynn)

x-ref:
"uwsgi fails with HTTP/2"
https://redmine.lighttpd.net/issues/3031

show more ...


# c0e2667b 09-Nov-2020 Glenn Strauss <[email protected]>

[multiple] handle NULL val as empty in *_env_add (fixes #3030)

(bug on master branch; never released)

(thx flynn)

x-ref:
"Fastcgi fails if server.tag is empty"
https://redmine.lighttpd.net/iss

[multiple] handle NULL val as empty in *_env_add (fixes #3030)

(bug on master branch; never released)

(thx flynn)

x-ref:
"Fastcgi fails if server.tag is empty"
https://redmine.lighttpd.net/issues/3030

show more ...


Revision tags: 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
# 81029b8b 29-Sep-2020 Glenn Strauss <[email protected]>

[multiple] inline chunkqueue where always alloc'd

inline struct chunkqueue where always allocated in other structs

(memory locality)


# 97e314fc 08-Sep-2020 Glenn Strauss <[email protected]>

[multiple] inline chunkqueue_length()


# 33c8cf41 25-Jul-2020 Glenn Strauss <[email protected]>

[multiple] rename connection_reset hook to request

rename connection_reset to handle_request_reset


Revision tags: lighttpd-1.4.55
# 7c7f8c46 13-Jan-2020 Glenn Strauss <[email protected]>

[multiple] split con, request (very large change)

NB: r->tmp_buf == srv->tmp_buf (pointer is copied for quicker access)

NB: request read and write chunkqueues currently point to connection
chun

[multiple] split con, request (very large change)

NB: r->tmp_buf == srv->tmp_buf (pointer is copied for quicker access)

NB: request read and write chunkqueues currently point to connection
chunkqueues; per-request and per-connection chunkqueues are
not distinct from one another
con->read_queue == r->read_queue
con->write_queue == r->write_queue

NB: in the future, a separate connection config may be needed for
connection-level module hooks. Similarly, might need to have
per-request chunkqueues separate from per-connection chunkqueues.
Should probably also have a request_reset() which is distinct from
connection_reset().

show more ...


# 31d94953 11-Jan-2020 Glenn Strauss <[email protected]>

[core] store subrequest_handler instead of mode

store pointer to module in handler_module instead of con->mode id


# 100dfaa3 09-Jan-2020 Glenn Strauss <[email protected]>

[core] move plugin_ctx into (request_st *)

NB: in the future, a separate plugin_ctx may be needed for
connection-level plugins to keep state across multiple requests


# 1474be78 08-Jan-2020 Glenn Strauss <[email protected]>

[core] move addtl request-specific struct members


# af5df352 07-Jan-2020 Glenn Strauss <[email protected]>

[core] rename content_length to reqbody_length

rename content_length to reqbody_length in request,
to more easily differentiate request body length
from response content_length


# 03b4c993 08-Dec-2019 Glenn Strauss <[email protected]>

[multiple] generic config array type checking


# f24e6d69 28-Nov-2019 Glenn Strauss <[email protected]>

[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 le

[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)

show more ...


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

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

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


# 010c2894 25-Nov-2019 Glenn Strauss <[email protected]>

[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 passi

[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)

show more ...


# 4a6fe838 13-Nov-2019 Glenn Strauss <[email protected]>

[multiple] gw_backends config_plugin_values_init()


# e2de4e58 19-Oct-2019 Glenn Strauss <[email protected]>

[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


# 36f64b26 17-Oct-2019 Glenn Strauss <[email protected]>

[core] simpler config_check_cond()

optimize for common case where condition has been evaluated for
the request and a cached result exists

(also: begin isolating data_config)


# 601c572c 13-Oct-2019 Glenn Strauss <[email protected]>

[core] inline buffer as part of data_string value

(instead of value being (buffer *))


12345678