summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* [build] check getxattr before attr_get and -lattrGlenn Strauss2021-12-103-3/+18
| | | | | | | check getxattr before attr_get and -lattr; do not link with -lattr if getxattr is available from glibc (modern glibc systems do not require libattr-devel build dependency)
* [mod_webdav] If-None-Match on non-existent entityGlenn Strauss2021-12-091-1/+1
| | | | | | | | | | fix logic inversion on If-None-Match test on non-existent entity return 412 if If-None-Match: "*" for non-existent entity x-ref: "trying to use Joplin Android App with lighttpd" https://redmine.lighttpd.net/boards/3/topics/10193
* [core] add remote IP to some error msgs (fixes #3122)Glenn Strauss2021-12-092-4/+7
| | | | | | | | add remote IP to some select error msgs x-ref: "Error messages should include client IP" https://redmine.lighttpd.net/issues/3122
* [core] make setrlimit() warn, not fatalGlenn Strauss2021-12-081-1/+2
| | | | | | | (thx limb) make setrlimit() issue warning on error, not fatal, and add suggesting to configure SELinux permissions
* [core] adjust time jump detection (fixes #3123)Glenn Strauss2021-12-081-8/+14
| | | | | | | | adjust time jump detection to handle when server.max-workers is non-zero x-ref: "child exit causes time jump false positive when server.max-workers is non-zero" https://redmine.lighttpd.net/issues/3123
* [meson] need -lrt with glibc < 2.17 (fixes #3120)Glenn Strauss2021-12-071-0/+4
| | | | | | | | (thx gzpapp at gmail dot com) x-ref: "Building on glibc 2.16 where clock_gettime() is in librt.so" https://redmine.lighttpd.net/issues/3120
* [core] fix trace issued for loading mod_auth (fixes #3121)Glenn Strauss2021-12-071-7/+12
| | | | | | | | | | fix trace issued for loading mod_auth after dynamic modules x-ref: "Curious message on startup with version 1.4.63" https://redmine.lighttpd.net/boards/2/topics/10182 "mod_auth warning on startup" https://redmine.lighttpd.net/issues/3121
* [core] fix reqpool mem corruption in 1.4.62 (fixes #3118)Glenn Strauss2021-12-044-4/+6
| | | | | | | | x-ref: "Segfault after updating to version 1.4.62" https://redmine.lighttpd.net/issues/3118 "Segfault on closing connections" https://redmine.lighttpd.net/issues/3119
* [core] isolate use of sys/filio.hGlenn Strauss2021-12-022-8/+0
| | | | | isolate use of sys/filio.h to fdevent_ioctl_fionread() (illumos (OpenIndiana) defines FIONREAD in sys/filio.h)
* [core] import xxHash v0.8.1Glenn Strauss2021-12-021-739/+1622
| | | | | | | import xxhash.[ch] as algo_xxhash.[ch] https://github.com/Cyan4973/xxHash tag: v0.8.1 35b0373c697b5f160d3db26b1cbb45a0d5ba788c
* [core] fix crash when using lighttpd -1 with pipes (fixes #3117)Glenn Strauss2021-12-011-1/+1
| | | | | | | | | | | | | | | | (thx povcfe-bug) In some scenarios with lighttpd -1 on pipes, the event handler associated with the connection (con) will have been cleaned up, and a pending event on the one-off oneshot_fdn will not yet have been handled, leading to a crash. lighttpd typically is used to handle requests on sockets, not pipes. With nc (netcat), the requests might be sent over pipes. The bug occurred with the accommodations made in lighttpd to handle the request over pipes. x-ref: "Trigger crash when using lighttpd -1 with pipes" https://redmine.lighttpd.net/issues/3117
* [mod_auth] quiet coverity warningGlenn Strauss2021-11-291-1/+1
|
* [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
* [mod_dirlisting] fix bug not showing HEADER.txtGlenn Strauss2021-11-281-1/+1
| | | | | | | (thx gsker) fix bug not showing HEADER.txt or README.txt (regression in lighttpd 1.4.60 and 1.4.61)
* [mod_auth] RFC7616 HTTP Digest username* userhashGlenn Strauss2021-11-285-24/+201
| | | | | | | | | | | | | | | | RFC7616 HTTP Digest username* and userhash support (if configured) userhash support must be configured to enable: auth.require = ( "/" => ( "userhash" => "enable", ... ) ) and one of auth.backend = "htdigest" # mod_authn_file or auth.backend = "dbi" # mod_authn_dbi and appropriate modification to add userhash into htdigest or db table along with adding "sql-userhash" => "..." SQL query for mod_authn_dbi Note: open issue with curl preventing userhash from working with curl: https://github.com/curl/curl/pull/8066
* [build] fix CMake pcre2 detectionGlenn Strauss2021-11-241-1/+1
|
* [core] fix compiler warning in 32-bit buildGlenn Strauss2021-11-241-1/+1
|
* [core] allocate pcre output vector on demandGlenn Strauss2021-11-226-16/+22
| | | | | allocate pcre output vector on demand for saved config captures (similar to what is done in lighttpd for pcre2 support)
* [core] allocate one fewer cond_match_t, if neededGlenn Strauss2021-11-225-8/+7
| | | | allocate one fewer cond_match_t in r->cond_match_data, if any are needed
* [core] pcre2 support (--with-pcre2)Glenn Strauss2021-11-2215-49/+401
| | | | | | x-ref: "lighttpd: depends on obsolete pcre3 library" https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000063
* [core] extend pcre_keyvalue_ctx to pass more stateGlenn Strauss2021-11-214-22/+30
| | | | extend pcre_keyvalue_ctx to pass internal state
* [core] use stack w/ pcre_exec unless save capturesGlenn Strauss2021-11-2010-33/+16
| | | | | | | | | | | | | | 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, ...
* [core] save pcre result state in config_pcre_matchGlenn Strauss2021-11-201-11/+18
| | | | | | | | | | rename data_config_pcre_exec() to config_pcre_match() and move logic saving pcre result state from config_check_cond_nocache() split config_check_cond_nocache() into two funcs config_check_cond_nocache() participates in recursion config_check_cond_nocache_eval() evaluates the condition
* [core] save config regex captures only if usedGlenn Strauss2021-11-1911-36/+94
| | | | | | | | | | | | | | | | save config regex captures separately only if used by url.redirect or url.rewrite replacement directives within the condition (or for conditions containing directives from any other module which calls config_capture() for its directives during init) keep pointer to match data (cond_match_t *) in r->cond_match[] rather than cond_match_t to reduce data copying in h2_init_stream(). h2_init_stream() copies the results for already-evaluated conditions to avoid re-evaluating connection-level conditions for each and every stream. When conditions are reset, then the pointer in r->cond_match[] is updated when the condition is re-evaluated. (This all assumes that HTTP/2 connection-level conditions are not unset or re-evaluated once HTTP/2 streams begin.)
* [tests] t/test_mod needs -ldl on DebianGlenn Strauss2021-11-182-1/+2
|
* [mod_dirlisting] (experimental) json (disabled)Glenn Strauss2021-11-171-9/+186
| | | | | | | checkpoint (experimental) json output (disabled) from mod_dirlisting Soliciting feedback from anyone who might write client javascript employing json output from mod_dirlisting. What should be changed?
* [core] buffer_append_string_encoded_json()Glenn Strauss2021-11-172-0/+81
|
* [mod_dirlisting] check for disabled cache at startGlenn Strauss2021-11-171-2/+4
| | | | | | check for explicitly disabled cache during startup config (dir-listing.cache = ("max-age" => 0)) (e.g. to disable after having been enabled)
* [core] get_http_method_key() tweakGlenn Strauss2021-11-171-1/+1
|
* [tests] combine tests into test_common.cGlenn Strauss2021-11-1710-171/+93
| | | | | | combine common components tests into test_common.c combine into a single executable to reduce compilation/link redundancy
* [mod_evasive] update comment to add referencesGlenn Strauss2021-11-151-2/+13
| | | | | update comment to add references to other modules and mechanisms available in lighttpd to enforce security policy
* [tests] t/test_mod_evasive.cGlenn Strauss2021-11-155-0/+77
|
* [mod_evasive] smaller funcs for testingGlenn Strauss2021-11-151-23/+27
|
* [tests] t/test_mod_alias.cGlenn Strauss2021-11-155-0/+116
|
* [tests] t/test_mod now runs all t/test_mod_*.cGlenn Strauss2021-11-1511-453/+87
| | | | combine into a single executable to reduce compilation/link redundancy
* [core] better asm for binary num to ascii stringGlenn Strauss2021-11-123-25/+32
| | | | | | | | | | | compiler optimizers generally convert div to an equivalent mul, though not always optimally for modulus (%). In places where lighttpd is using both quotient and remainder, calculate the remainder from the quotient. x-ref: inspiration: https://lemire.me/blog/2019/02/08/faster-remainders-when-the-divisor-is-a-constant-beating-compilers-and-libdivide/ https://lemire.me/blog/2019/02/20/more-fun-with-fast-remainders-when-the-divisor-is-a-constant/
* [core] uint_fast32_t tweaksGlenn Strauss2021-11-122-6/+9
| | | | use uint_fast32_t in a few more places, where it yields better asm
* [mod_ssi] merge mod_ssi_expr.c into mod_ssi.cGlenn Strauss2021-11-128-391/+377
| | | | isolate this ancient relic
* [mod_ssi] remove mod_ssi parser generator fileGlenn Strauss2021-11-128-201/+28
|
* [mod_ssi] fix ancient bugs; replace cond parserGlenn Strauss2021-11-122-193/+209
|
* [mod_ssi] 0-init ssi_val_t in ssi_ctx_tGlenn Strauss2021-11-121-0/+1
|
* [core] use ck_assert() in vector.[ch]Glenn Strauss2021-11-072-6/+6
|
* [core] fix removal of server.pid-file when testing (fixes #3115)Glenn Strauss2021-11-051-5/+5
| | | | | | | | | | | (thx dinoex) fix removal of server.pid-file when testing config with lighttpd -tt (regression in lighttpd 1.4.60, 1.4.61) x-ref: "Test the configuration file while lighttpd is running." https://redmine.lighttpd.net/issues/3115
* [core] run plugin cleanup hooks in reverseGlenn Strauss2021-11-051-7/+17
| | | | | run plugin cleanup hooks in reverse to balance ctor/dtor-like plugin behaviors
* [tests] reenable test_mod_ssi in cmakeGlenn Strauss2021-11-054-28/+35
| | | | | (Instead, workaround added for libtool) (There must be better ways to do this, but I don't know them right now)
* [tests] disable test_mod_ssi in cmake (temporary)Glenn Strauss2021-11-041-3/+3
| | | | | disable test_mod_ssi in cmake (temporary) until include paths updated or dependency added for the generated ssi parser header and impl
* [tests] disable test_mod_ssi in cmake (temporary)Glenn Strauss2021-11-041-25/+25
| | | | | disable test_mod_ssi in cmake (temporary) until include paths updated or dependency added for the generated ssi parser header and impl
* [core] libev EV_ERROR conflicts with kqueueGlenn Strauss2021-11-041-0/+7
| | | | libev EV_ERROR conflicts with kqueue sys/event.h EV_ERROR
* [mod_cgi] check fd-to-cgi not -1 before closeGlenn Strauss2021-11-041-0/+1
| | | | sanity check
* [core] warn if dynamic modules before mod_authGlenn Strauss2021-11-041-0/+20
| | | | | | | warn if known dynamic modules listed before mod_auth in server.modules e.g. mod_auth must be listed before mod_fastcgi in server.modules for fastcgi.server = ( "mode" => "authorizer" ) to work properly