summaryrefslogtreecommitdiff
path: root/src/t
Commit message (Collapse)AuthorAgeFilesLines
* [core] rename http_kv funcs, reorder http_versionsGlenn Strauss2023-05-031-3/+4
| | | | | rename http_kv funcs for consistency ("http_" prefix) reorder http_versions[]
* [tests] _WIN32 close files before unlinkGlenn Strauss2023-05-033-8/+17
| | | | Also, adjust mod_ssi to remove assumption that "/tmp" is temp directory
* [tests] _WIN32 use TMPDIR (or TEMP) for test filesGlenn Strauss2023-05-033-27/+71
|
* [core] _WIN32 sys-unistd.h to wrap <unistd.h>Glenn Strauss2023-05-033-15/+7
| | | | (selective implementations; not complete)
* [core] _WIN32 protect code w/ HAVE_IPV6Glenn Strauss2023-05-031-0/+6
|
* [multiple] clang -Wstrict-prototypes for C2xGlenn Strauss2023-01-192-2/+2
| | | | | | | | | | | adjustments to compile warnings-free with recent clang changes that warn about potential behavior change for non-prototypes, including generic function pointers e.g. int(*)() x-ref: https://discourse.llvm.org/t/rfc-enabling-wstrict-prototypes-by-default-in-c/60521 https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2432.pdf https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2841.htm
* [multiple] remove deprecated modulesGlenn Strauss2022-11-302-74/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove deprecated modules: mod_evasive mod_secdownload mod_uploadprogress mod_usertrack These scheduled lighttpd behavior changes have been announced over the past year: * Continue gradual deprecation of "mini-application" lighttpd modules for which mod_magnet lua implementations are better and more flexible. Please post on lighttpd forums to share feedback if you use these modules. Forums: https://redmine.lighttpd.net/projects/lighttpd/boards * Deprecated: mod_evasive has been removed. mod_evasive can be replaced by mod_magnet and a few lines of lua: Replacement: https://wiki.lighttpd.net/ModMagnetExamples#lua-mod_evasive https://wiki.lighttpd.net/AbsoLUAtion#Fight-DDoS https://wiki.lighttpd.net/AbsoLUAtion#Mod_Security * Deprecated: mod_secdownload has been removed. mod_secdownload can be replaced by mod_magnet and a few lines of lua: Replacement: https://wiki.lighttpd.net/ModMagnetExamples#lua-mod_secdownload mod_secdownload historically uses insecure MD5 though SHA1, SHA256 available * Deprecated: mod_uploadprogress has been removed. mod_uploadprogress can be replaced by mod_magnet and a few lines of lua: Replacement: https://wiki.lighttpd.net/ModMagnetExamples#lua-mod_uploadprogress * Deprecated: mod_usertrack has been removed. mod_usertrack can be replaced by mod_magnet and a few lines of lua: Replacement: https://wiki.lighttpd.net/ModMagnetExamples#lua-mod_usertrack mod_usertrack historically uses insecure MD5.
* [core] fix li_base64_dec() on whitespaceGlenn Strauss2022-07-011-0/+15
| | | | | | | | (regression in lighttpd 1.4.60 - lighttpd 1.4.65) impacted: mod_wolfssl loading certificate private keys must ignore whitespace in count of encoded chars
* [core] buffer_append_bs_escaped_json()Glenn Strauss2022-06-101-0/+36
| | | | | | 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
* [tests] test stubs for http_header.c and http_kv.cGlenn Strauss2022-06-073-0/+137
|
* [core] "url-invalid-utf8-reject" normalization optGlenn Strauss2022-05-241-1/+8
| | | | | server.http-parseopts "url-invalid-utf8-reject" url normalization option default: "url-invalid-utf8-reject" => "enable"
* [multiple] remove buffer_init_string()Glenn Strauss2022-01-071-2/+4
| | | | remove (minor) convenience func; easy to replace
* [asan tests] fix memory leaksStefan Bühler2022-01-064-0/+8
|
* [multiple] remove r->physical.etagGlenn Strauss2021-12-122-3/+0
| | | | (no longer used; was used as temporary buffer)
* [tests] t/test_mod_ssi adjust to follow symlinksGlenn Strauss2021-11-281-0/+1
| | | | | | t/test_mod_ssi adjust to follow symlinks /tmp may be a symlink on MacOS
* [core] allocate pcre output vector on demandGlenn Strauss2021-11-221-5/+7
| | | | | allocate pcre output vector on demand for saved config captures (similar to what is done in lighttpd for pcre2 support)
* [core] pcre2 support (--with-pcre2)Glenn Strauss2021-11-221-0/+4
| | | | | | x-ref: "lighttpd: depends on obsolete pcre3 library" https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000063
* [core] use stack w/ pcre_exec unless save capturesGlenn Strauss2021-11-201-1/+1
| | | | | | | | | | | | | | use stack w/ pcre_exec unless saving captures from config conditions reduce memory allocations per request where lighttpd.conf does not contain url.redirect or url.rewrite rules where replacements reference a match of the enclosing lighttpd.conf condition (e.g. %0, %1, %2 ...) move cond_cache_t 'patterncount' to cond_match_t 'captures' While cond_match_t is no longer sized power-2, it is generally expected to be used much less frequently than before (which was all the time), since it is now used only with url.redirect or url.rewrite with references %0, %1, %2, ...
* [tests] combine tests into test_common.cGlenn Strauss2021-11-177-19/+43
| | | | | | combine common components tests into test_common.c combine into a single executable to reduce compilation/link redundancy
* [tests] t/test_mod_evasive.cGlenn Strauss2021-11-152-0/+74
|
* [tests] t/test_mod_alias.cGlenn Strauss2021-11-152-0/+113
|
* [tests] t/test_mod now runs all t/test_mod_*.cGlenn Strauss2021-11-158-166/+51
| | | | combine into a single executable to reduce compilation/link redundancy
* [mod_ssi] merge mod_ssi_expr.c into mod_ssi.cGlenn Strauss2021-11-121-1/+0
| | | | isolate this ancient relic
* [mod_ssi] remove mod_ssi parser generator fileGlenn Strauss2021-11-121-3/+0
|
* [tests] reenable test_mod_ssi in cmakeGlenn Strauss2021-11-051-0/+3
| | | | | (Instead, workaround added for libtool) (There must be better ways to do this, but I don't know them right now)
* [core] fdevent_impl.c separate from fdevent.cGlenn Strauss2021-11-013-27/+0
|
* [tests] t/test_mod_ssiGlenn Strauss2021-11-011-0/+202
|
* [multiple] de-dup file and piped loggers (fixes #3101)Glenn Strauss2021-09-136-18/+23
| | | | | | | | de-dup file and piped loggers for error logs and access logs x-ref: "RFE: de-dup file and piped loggers" https://redmine.lighttpd.net/issues/3101
* [multiple] quiet coverity warningsGlenn Strauss2021-09-091-0/+4
|
* [tests] t/test_mod_indexfileGlenn Strauss2021-09-081-0/+140
| | | | | | also remove some now-redundant tests from request.t and reduce scripts and directories under tests (because automake is sloooow and the fewer dirs, the better)
* [tests] t/test_mod_staticfileGlenn Strauss2021-09-041-0/+458
| | | | move some tests from tests/request.t to src/t/test_mod_staticfile.c
* [tests] mv tests from request.t to test_request.cGlenn Strauss2021-08-271-0/+42
| | | | move some tests from tests/*.t to src/t/test_request.c
* [tests] update t/test_request.cGlenn Strauss2021-08-271-23/+18
| | | | use http_header_request_get() in tests to retrieve request headers
* [core] parse $HTTP["remote-ip"] CIDR mask at startGlenn Strauss2021-08-271-8/+29
| | | | | | | | | parse $HTTP["remote-ip"] CIDR mask into structured data at startup note: adds buffer_move() to configparser.y to reduce memory copying for all config values, and is required for remote-ip to preserve the structured data added after the config value string. (Alternatively, could have normalized the remote-ip value after copying into dc->string)
* [core] base64 encode round-up for required spaceGlenn Strauss2021-05-181-10/+8
| | | | | | | no need for extra work for precision allocation to avoid 0-3 extra chars note: callers passing precise buffer size for without padding will need to be modified to pass a slightly larger buffer, e.g. mod_secdownload
* [tests] quite coverity warning in test_request.cGlenn Strauss2021-05-171-9/+9
|
* [core] quiet coverity noiseGlenn Strauss2021-05-081-2/+2
|
* [core] simplify buffer_path_simplify()Glenn Strauss2021-05-081-6/+3
|
* [mod_userdir] use stat_cache_path_isdir()Glenn Strauss2021-03-261-0/+5
|
* [multiple] PCRE w/ PCRE_STUDY_JIT_COMPILE (fixes #2361)Glenn Strauss2021-03-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | enabled by default disable using server.feature-flags += ("server.pcre_jit" => "disable") Available since pcre-8.20 (2011), and improved in pcre-8.32 (2012), PCRE_STUDY_JIT_COMPILE can greatly speed up repeated execution of PCRE patterns. (https://zherczeg.github.io/sljit/pcre.html) lighttpd continues to use pcre_exec() instead of pcre_jit_exec(), even though doing so does not realize all of the performance increase potentially available with PCRE_STUDY_JIT_COMPILE and pcre_jit_exec(). pcre_jit_exec() is available with PCRE 8.32 and later, if PCRE is compiled with --enable-jit, but lighttpd does not currently use pcre_jit_exec() since the PCRE library might not have been compiled with --enable-jit (though this could be solved with a weak symbol). Similarly, lighttpd does not currently configure the pcre_jit_stack. (Using pcre_jit_exec() may be revisited in the future.) x-ref: "add support for pcre JIT" https://redmine.lighttpd.net/issues/2361
* [multiple] quiet some clang-analyzer warningsGlenn Strauss2021-01-291-0/+1
|
* [multiple] use stat_cache_path_isdir()Glenn Strauss2020-10-132-4/+4
|
* [core] http_request_parse_header() specializedGlenn Strauss2020-10-111-2/+3
| | | | | | | | http_request_parse_header() specialized for HTTP/2 request headers to be parsed as each field-name and value is HPACK-decoded; send headers directly from HPACK decoder, rather than double-buffering in chunkqueue http_request_headers_process_h2() for post-processing
* [core] move http_request_headers_process()Glenn Strauss2020-10-031-1/+1
| | | | move http_request_headers_process() to request.[ch]
* [tests] test_base64.c clear buf vs resetGlenn Strauss2020-08-021-1/+1
| | | | (can be slightly faster to clear buffer than to reset buffer)
* quiet clang analyzer scan-build warningsGlenn Strauss2020-07-082-1/+8
| | | | | | | | | | (expansion of buffer_string_lenth() inline function and CONST_BUF_LEN() macro, which always check for NULL, appears to cause the analyzer to believe that a pointer might be NULL in cases where it otherwise can not be NULL) x-ref: http://clang-analyzer.llvm.org/faq.html
* [doc] src/t/READMEGlenn Strauss2020-07-081-0/+4
|
* [tests] use buffer_eq_slen() for str comparisonGlenn Strauss2020-07-088-61/+48
| | | | (substitute buffer_eq_slen() for buffer_is_equal_string())
* [tests] t/test_mod_userdirGlenn Strauss2020-07-081-0/+207
| | | | | create t/test_mod_userdir to replace sparse tests in tests/mod-userdir.t remove tests/mod-userdir.t
* [tests] stub out config funcs in test_mod_*Glenn Strauss2020-07-083-0/+45
|