summaryrefslogtreecommitdiff
path: root/src/mod_ajp13.c
Commit message (Collapse)AuthorAgeFilesLines
* [build] _WIN32 __declspec(dllexport) *_plugin_initGlenn Strauss2023-05-031-0/+1
| | | | _WIN32 __declspec(dllexport) on mod_*_plugin_init()
* [multiple] store ptrs to remote addr in request_st (#3192)Glenn Strauss2023-02-281-1/+1
| | | | | | | | | | | | | | | | | adds two pointers to (request_st *) (cost: 16 bytes in 64-bit builds) prepares for upcoming changes to mod_extforward to manage remote addr per request for HTTP/2 requests, rather than remote addr per connection. Modern load balancers often provide options to reuse connections for *different* clients, and therefore mod_extforward might change the remote addr per request. x-ref: "RFE: mod_extforward and multiplexed requests via HTTP/2" https://redmine.lighttpd.net/issues/3192 "Evaluation of remote_addr for mod_maxminddb for multiplexed connections" https://redmine.lighttpd.net/issues/3191
* [multiple] employ ck_calloc, ck_malloc shared codeGlenn Strauss2022-12-101-2/+1
| | | | | employ ck_calloc(), ck_malloc() shared code to slightly reduce code size (centralize the ck_assert() to check that memory allocation succeeded)
* [multiple] mark mod_*_plugin_init() funcs coldGlenn Strauss2022-12-071-0/+1
|
* [mod_ajp13] fix crash with bad response headers (fixes #3170)Glenn Strauss2022-08-141-0/+6
| | | | | | | | | | fix crash with bad response headers from AJP13 backend (thx MichaƂ Dardas) x-ref: "mod_ajp13 read heap buffer overflow" https://redmine.lighttpd.net/issues/3170
* [multiple] rename status_counter -> plugin_statsGlenn Strauss2022-05-111-2/+1
|
* [multiple] use buffer_append_char()Glenn Strauss2022-05-111-1/+1
|
* [mod_ajp13,mod_fastcgi] recv_parse smaller funcsGlenn Strauss2021-10-271-12/+22
| | | | break *_recv_parse() into a pair of slightly smaller funcs
* [mod_ajp13,mod_fastcgi] check resp w/ content lenGlenn Strauss2021-10-271-1/+2
| | | | | limit response body from mod_ajp13 and mod_fastcgi to Content-Length, if Content-Length is provided in response headers; discard excess
* [mod_ajp13,mod_fastcgi] comment: no response bodyGlenn Strauss2021-10-161-0/+15
| | | | | | | | | | | | add comment for handling of streaming with no response body add commented-out code to disable streaming to wait for backend protocol to signal end of response (prevent http_response_write_prepare() from short-circuiting and finishing responses without response body) x-ref: "FastCGI premature socket close with response streaming and 204 status" https://redmine.lighttpd.net/boards/2/topics/10066
* [core] disable streaming response with authorizer (fixes #3106)Glenn Strauss2021-10-011-0/+6
| | | | | | | | | | | | | disable streaming response while processing "authorizer" mode until "authorizer" response 200 OK from the backend is complete (thx jefftharris) x-ref: "FastCGI authorizer hang with server.stream-response-body" https://redmine.lighttpd.net/boards/2/topics/9969 "FastCGI authorizer hang with server.stream-response-body" https://redmine.lighttpd.net/issues/3106
* [multiple] inline struct in con->dst_addr_bufGlenn Strauss2021-08-271-1/+1
| | | | | (mod_extforward recently changed to use buffer_move() to save addr instead of swapping pointers)
* [multiple] reduce redundant NULL buffer checksGlenn Strauss2021-08-271-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [multiple] use buffer_append_* aggregatesGlenn Strauss2021-04-021-3/+3
| | | | reduces the number of round-trips into some frequently-called routines
* [mod_ajp13] AJPv13 Tomcat connector for lighttpdGlenn Strauss2021-01-291-0/+972
(experimental) AJPv13 protocol reference: https://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html