2
0
Fork 0
Commit Graph

427 Commits (e4c99e55d618716d8a3a70e13750f56a0e07046f)

Author SHA1 Message Date
Stefan Bühler d579b8a163 [core]: accept LF instead of CR LF in http requests 2011-08-22 17:30:29 +02:00
Thomas Porzelt 9f832c75ea Config syntax changes and parser fixes:
* Change ":" to "=>" in hash tables
* Change assignments to not need "=" anymore
* User defined actions must now be prefixed with the "action" keyword
* Anonymous user defined actions don't need the "$" prefix anymore
* Fix parsing of conditionals with more than 2 conditions
2011-08-20 11:43:02 +02:00
Thomas Porzelt 496a28f197 [core] truncate temp string before evaluating pattern. add comment to pattern.h that li_eval_pattern() does not truncate the string for you 2011-07-20 20:48:30 +02:00
Stefan Bühler 0fcbfb7ab7 [core] optimize syscalls per connection 2011-05-04 15:23:53 +02:00
Stefan Bühler 45f0cf0bf3 Increase timeout for angel-listen 2011-04-12 10:53:24 +02:00
Stefan Bühler 6164ac83c9 [*cgi env]: Fix REQUEST_URI 2011-03-23 14:59:43 +01:00
Stefan Bühler d9cc24b8e6 [core]: fix connection/vrequest callbacks to return FALSE after they got reset, so handling stops 2011-01-10 20:00:44 +01:00
Stefan Bühler bf0ece96fb [throttle] Fix segfaults 2011-01-02 13:52:18 +01:00
Stefan Bühler 9c6f894eb5 [mime-types] Fix mimetype insert, add new test cases to catch this 2010-12-30 15:06:10 +01:00
Thomas Porzelt 912976fe30 [core] Attempt to fix issue with stalling connections in throttle pools 2010-12-25 17:40:53 +01:00
Stefan Bühler 7a67ba94d7 [autotools]: make sure pkg-config m4 is available in autoconf, check for ragel in ./configure 2010-12-07 23:23:10 +01:00
Thomas Porzelt c1fe5047be [plugin_core] Fix cascading in docroot action 2010-11-13 16:25:49 +01:00
Thomas Porzelt 772e66b91c [core] Immediately rearm throttle pool and update con when inserting into pool 2010-11-01 20:09:41 +01:00
Stefan Bühler 0ab5aee623 [throttle] Fix loop counter (leaded to segfaults) 2010-10-19 23:34:46 +02:00
Stefan Bühler 26d9155e87 [pattern] fix endless (memory eating) loop in pattern parsing 2010-10-13 14:46:31 +02:00
Stefan Bühler 11fa781f98 Fix some warnings found with clang analyzer 2010-10-07 18:31:21 +02:00
Stefan Bühler 2941105e28 [pattern] Fix vr->wrk->tmp_str usage, remove pattern.h from base.h, add pattern support to header.add* actions 2010-10-07 16:14:12 +02:00
Stefan Bühler db6a989677 Fix some warnings 2010-10-06 14:31:11 +02:00
Stefan Bühler f521719737 Fix some link problems with -lcrypt 2010-10-06 14:24:01 +02:00
Stefan Bühler ab9421a5e1 [core] Provide safe wrapper for crypt if crypt_r is not available 2010-10-06 13:47:48 +02:00
Stefan Bühler 67fcc00125 [pattern] Fix regex nth callback, activate env-set pattern range tests 2010-10-05 14:50:21 +02:00
Stefan Bühler 97d6300c62 [plugin_core] Support %n in all pattern evals 2010-10-05 14:44:33 +02:00
Stefan Bühler 01f0c1606f [core] Fix pattern range parser, fix docroot_nth callback 2010-10-05 14:37:33 +02:00
Stefan Bühler 177fc95219 [core] Add phys.docroot and phys.pathinfo 2010-10-05 13:57:26 +02:00
Stefan Bühler 52584c99bb [pattern] Add ranges (and fix match-info handling) 2010-10-05 13:26:03 +02:00
Stefan Bühler eecf0d90be [pattern] Fix handling of escaped characters 2010-10-05 13:25:25 +02:00
Stefan Bühler 688a17372f [tests] Add BadRequest test (and fix the bug), add "status" vhost 2010-10-05 13:16:39 +02:00
Stefan Bühler d6820e5cfd [pattern] Hide pattern-part struct 2010-09-26 01:04:50 +02:00
Thomas Porzelt ce4f9391e3 [core] Fix tiny leak in pattern code when parse errors happen 2010-09-25 23:43:54 +02:00
Thomas Porzelt efb04f1f13 [config parser] include: Log warning if no file matches wildcard, error if no wildcard and file not found 2010-09-25 15:55:31 +02:00
Stefan Bühler c35cf21c52 [log] Add basic api to open log files via angel 2010-09-25 14:13:29 +02:00
Stefan Bühler 97088f667e Fix typos / missing includes 2010-09-23 21:26:48 +02:00
Stefan Bühler de43e75b75 [core] Disable mmap as we don't handle SIGBUS yet 2010-09-23 21:23:39 +02:00
Thomas Porzelt 31d2291a1c [core] Add support for throttling by IP 2010-09-23 21:01:46 +02:00
Stefan Bühler 8ae6902602 [core] remove lighttpd-glue.h from base.h 2010-09-23 18:35:57 +02:00
Stefan Bühler 3b1a781381 [core] remove encoding.h from base.h includes 2010-09-23 18:28:31 +02:00
Stefan Bühler 7fbcfb86d9 [mod_openssl]: better io event handling (ssl may want to write while lighty only wants to read) 2010-09-23 13:36:07 +02:00
Stefan Bühler 0247ee879f [angel/core]: remove old unix socket before binding 2010-09-21 15:17:30 +02:00
Stefan Bühler 876261c62c [core/angel]: Use strict ip matching (family must match, no IPv4-mapped IPv6) 2010-09-21 15:11:48 +02:00
Stefan Bühler 14660bee4f [core/angel]: support unix socket listen 2010-09-21 15:08:16 +02:00
Stefan Bühler 823b9d13c2 [core]: wait for connections before shutdown 2010-09-21 14:33:32 +02:00
Thomas Porzelt 47bc318a35 [core] Make li_server_ts_format_add() threadsafe 2010-09-19 18:03:11 +02:00
Thomas Porzelt 14d48527af [core] Make log.timestamp creation/destruction threadsafe 2010-09-19 18:00:31 +02:00
Thomas Porzelt d0ae21c7b2 [config parser] Rename var.PID/var.CWD/env.* to sys.pid/sys.cwd/sys.env.* and add sys.version containing the lighty version 2010-09-19 13:12:02 +02:00
Thomas Porzelt 587c7383ba [core] Add support for req.env/header[key] to patterns 2010-09-18 14:47:11 +02:00
Thomas Porzelt f088e43f62 [plugin_core] Add env.set/add/remove/clear actions 2010-09-18 13:14:28 +02:00
Thomas Porzelt a3b7ce74af [core] Rework throttle-pool handling to be thread-safe in creation/destruction aswell as more accurate and fair throttling 2010-09-12 18:54:57 +02:00
Stefan Bühler abdd422aa9 plugin.c: fix optionptr mem-leak 2010-09-12 17:44:00 +02:00
Stefan Bühler b29c8161f1 Fix mimetypes 2010-09-12 15:55:45 +02:00
Stefan Bühler be65208143 waitqueue: modify callback 2010-09-12 14:19:25 +02:00
Thomas Porzelt c7a39e4da1 [core] Fix compilation on non-linux systems 2010-09-11 11:34:06 +02:00
Thomas Porzelt 0eaed50c1c [core] Use uintptr_t instead of guintptr as it requires an otherwise unneeded recent glib version 2010-09-11 11:28:21 +02:00
Stefan Bühler 9ba3395241 Fix C++ style comments 2010-09-05 14:19:44 +02:00
Stefan Bühler 91fda70bca [plugin_core] Fix mixed declarations and code 2010-09-05 14:19:43 +02:00
Stefan Bühler 7d938e48e3 [log] Fix prepare handler 2010-09-05 14:19:27 +02:00
Stefan Bühler 79d98f5991 [core] Use liJobQueue for vrequest job queue 2010-09-05 13:39:30 +02:00
Thomas Porzelt 582dfa99d7 [core] Rework mimetype lookup code 2010-09-04 14:50:35 +02:00
Thomas Porzelt 9c63e60cb7 [core] Add workers.cpu_affinity setup action 2010-08-29 12:24:30 +02:00
Stefan Bühler b9af60f92d [plugin_core]: don't stat last entry in docroot list, it is used anyway 2010-08-26 13:52:02 +02:00
Stefan Bühler d133b8ad8c [lua]: add subrequst_lua.c 2010-08-26 09:00:50 +02:00
Stefan Bühler 77ad119f66 [lua]: add subrequests 2010-08-26 00:34:28 +02:00
Stefan Bühler 1c3d3c287f [core]: add tasklet pools to workers and use them for stat-cache 2010-08-25 18:05:23 +02:00
Stefan Bühler 6f454d0008 [plugin_core]: add "static_no_fail" action, which doesn't return 403/404 so other actions can handler the request 2010-08-24 21:48:56 +02:00
Stefan Bühler c3164aba8b Move binary names: angel becomes lighttpd2, worker lighttpd2-worker 2010-08-24 21:05:17 +02:00
Stefan Bühler b8a0921265 Add some missing LI_/li prefixes for types and enum values 2010-08-19 17:24:07 +02:00
Stefan Bühler b87e74d151 Optimize IO handling to safe syscalls; run vrequest state machines twice before looking for new io events 2010-08-11 13:27:27 +02:00
Stefan Bühler b876f8401d [core]: rework connection/vrequest structs; add liConInfo 2010-08-11 13:27:27 +02:00
Stefan Bühler cae0c15710 Optimize some string handling in chunk parser 2010-08-11 13:07:33 +02:00
Stefan Bühler 254ba2a1f6 Optimize header insertion 2010-08-11 13:07:29 +02:00
Stefan Bühler cc0044c4ee Fix http method parser, add inlined g_string_append_len 2010-08-11 12:56:08 +02:00
Stefan Bühler a2ed50dedd Optimize some socket initialization handling 2010-08-11 12:56:01 +02:00
Stefan Bühler 7bb671de4c [config parser] fix operators 2010-08-09 00:16:13 +02:00
Stefan Bühler b7e6ba4eb5 condition.c: set match_type in all cases 2010-08-08 23:54:08 +02:00
Stefan Bühler 8b17198eb6 Try to fix some bugs in the config parser 2010-08-08 23:36:20 +02:00
Thomas Porzelt 2885c88ae7 [core] Config parser: one more fix for condition parsing 2010-08-08 21:53:21 +02:00
Thomas Porzelt 5b9cc67ad5 [core] Config parser: fix a whitespace handling bug 2010-08-08 14:21:36 +02:00
Thomas Porzelt 7648ef0f40 [core] Config parser: Fix parsing rules for multiple else-if conditions 2010-08-08 01:05:46 +02:00
Thomas Porzelt 45d9fda41e [core] Config parser: fix condition with key handling 2010-08-08 00:27:01 +02:00
Stefan Bühler 18fd43840c [mod_balancer] fix typo, and fix balancer handling in action-stack 2010-08-07 19:32:11 +02:00
Stefan Bühler dd0bee3fd6 action_stack: fix balanacer management 2010-08-07 18:45:21 +02:00
Thomas Porzelt ab94d8390d [core] Change *bit integer suffixes in config parser 2010-08-04 22:04:00 +02:00
Thomas Porzelt 5f655d3b6e [core] Fix 'else if' handling in config parser 2010-08-04 21:19:32 +02:00
Thomas Porzelt 65a3d5dfa9 [core] Add support for 'and' and 'or' in conditions to the config parser 2010-08-03 22:03:14 +02:00
Thomas Porzelt e2a551298e [core] Use liCond* helpers in li_pattern_parse/eval 2010-07-24 14:51:44 +02:00
Thomas Porzelt c8663ffda9 [core] Allow disabling of stat cache through stat_cache.ttl 0; 2010-07-18 13:53:07 +02:00
Stefan Bühler c23509424d pattern: check for NULL in li_pattern_free 2010-07-17 15:23:42 +02:00
Thomas Porzelt a4b0f4a9c0 [core] Fix segfault in li_vrequest_reset() when default value is NULL 2010-07-11 23:53:59 +02:00
Thomas Porzelt 43def72d5b [core] Fix tiny leak in docroot action 2010-07-11 23:53:01 +02:00
Thomas Porzelt a5f6e08abd [core] Fix for last commit: undefined flag with older libev headers so have to use makros 2010-07-11 21:07:09 +02:00
Thomas Porzelt 396f740e77 [core] Use EVFLAG_NOSIGFD to disable signalfd usage if libev 3.8 is used, it breaks signal handling 2010-07-11 20:52:01 +02:00
Thomas Porzelt e2faced3dd [core] Fix worker timestamp cache initialization resulting in segfault when a module adds a new formatter (e.g. mod_accesslog) 2010-06-30 09:56:13 +02:00
Thomas Porzelt 0b860b2a0c [core] Ensure a connection is put into io timeout queue after keepalive] 2010-06-14 20:34:58 +02:00
Thomas Porzelt 5531e36cf4 [core] Ensure that a connection is always in the io timeout queue (if not in keep-alive) 2010-06-13 18:02:14 +02:00
Thomas Porzelt bba88e3326 [core] Fix detection of too big request http header 2010-06-12 15:16:41 +02:00
Thomas Porzelt 6060380550 [core] Small fix for keepalive handling 2010-06-12 13:42:23 +02:00
Thomas Porzelt 39df9263fb [plugin_core] Add support for patterns to log.write action 2010-06-12 12:40:10 +02:00
Thomas Porzelt 013297bc9b [core] Ignore callbacks if NULL in pattern_eval() 2010-06-12 12:37:59 +02:00
Stefan Bühler 69f4ad2b4b Don't set RLIM_INFINITY as rlim_cur for RLIMIT_NOFILE, use 4096 if rlim_cur < 4096 and rlim_max = inf 2010-06-12 11:43:12 +02:00
Thomas Porzelt 7056b879e7 [core] Fix detection of too large http request header 2010-06-10 22:37:42 +02:00
Thomas Porzelt 7409b2ef63 [plugin_core] Enable 'docroot' action to use patterns and even traverse a list of these 2010-06-07 00:02:43 +02:00
Thomas Porzelt 3668ef97ab [core] Add liPattern type and associated functions 2010-06-06 23:54:55 +02:00
Stefan Bühler 5e063e2b04 [core] Enable li_plugins_init_lua again, fixed segfault 2010-06-06 12:29:25 +02:00
Thomas Porzelt 14ed0a508b [core] Disable call to li_plugins_init_lua() for now, causes segfault due to being called in the wrong place (srv->plugins does not exist yet) 2010-05-29 19:28:20 +02:00
Thomas Porzelt b5009f18df [core] Fix usage of sched_setaffinity() and disable it for now as it seems to impose a little performance hit 2010-05-16 18:35:54 +02:00
Thomas Porzelt 91cc6e06bb [waf] Don't compile profiler.c or link libexecinfo on FreeBSD when not using --with-profiler 2010-05-16 13:45:03 +02:00
Thomas Porzelt 5646b353ea [core] Specify file permissions when creating profiler output file 2010-05-16 13:41:21 +02:00
Thomas Porzelt c8a23a947f [core] Check if profiler output file has been truncated since opening 2010-05-15 12:45:22 +02:00
Stefan Bühler e00febcd40 Fix vrequest-ref api 2010-05-14 13:12:33 +02:00
Stefan Bühler c2271c15c3 Add plugin init-lua hook 2010-05-14 13:10:19 +02:00
Stefan Bühler 4afebee1c7 Make profiler optional 2010-05-13 12:19:12 +02:00
Thomas Porzelt 727a480a14 [core] Remove profile_mem action from core plugin, was moved to mod_debug 2010-05-13 12:11:24 +02:00
Thomas Porzelt bf632326a7 [core] Update and start (if necessary) io timeout in li_worker_run() fixing first worker ignoring io.timeout from config 2010-05-10 21:47:57 +02:00
Thomas Porzelt de3515cd27 [waf] Add check for and link against libexecinfo on FreeBSD 2010-05-09 15:08:31 +02:00
Thomas Porzelt f285ad372e [core,waf,autoconf,cmake] Add check for execinfo.h and disable stacktraces in profiler if not available 2010-05-09 14:18:52 +02:00
Thomas Porzelt fa1c73cbe6 [core] Make profiler output to file, fix small issue with profiler_try_realloc() 2010-05-09 12:12:53 +02:00
Thomas Porzelt 1dfa1c37f2 [core] Reworked memory profiler. Commited only very simple version tracking allocated objects and printing backtraces for leaked ones upon exit 2010-05-08 19:30:38 +02:00
Thomas Porzelt c0e7ef3654 [core] Fix memleak in filter_buffer_on_disk/bod_open() and free srv->optionptrs on exit 2010-05-08 11:55:52 +02:00
Stefan Bühler b144242a07 Fix timestamp handling a little bit 2010-05-08 09:15:38 +02:00
Stefan Bühler 26942e6b6c Fix dangling references to action stack 2010-05-07 21:14:27 +02:00
Stefan Bühler a8efcfcc0e modify plugin api to include worker context for action/option parsing; add per-worker callback for stop_worker
* create main_worker earlier
2010-05-07 20:54:50 +02:00
Thomas Porzelt 86e039e6d2 [core] Add --module-resident commandline parameter to prevent module unloading. Useful for valgrind or tcmalloc 2010-05-06 22:42:47 +02:00
Stefan Bühler 46b9a28f87 Fix pathinfo; action to remove the pathinfo from the url too (for SCRIPT_NAME) 2010-05-01 11:54:25 +02:00
Thomas Porzelt bf2d01e56c [core] Ensure that a connection is always in the io timeout queue when not in keep-alive state 2010-04-25 16:34:52 +02:00
Thomas Porzelt 9d14c6bce7 [core] Send Content-Type text/html for generated error pages 2010-04-05 14:33:52 +02:00
Thomas Porzelt 0af117d47f [core] Reposition check for header size limit fixing wrong positives 2010-04-04 17:11:57 +02:00
Thomas Porzelt 683e334599 [plugin_core] Return error 405 for methods other than GET or HEAD on static files 2010-04-04 17:07:24 +02:00
Thomas Porzelt ad8570423a [core] Add li_http_method_from_string() function 2010-04-04 16:37:02 +02:00
Stefan Bühler 19bc091432 Only call li_plugins_handle_vrclose in vrequest_reset if vrequest is in use 2010-04-03 21:32:02 +02:00
Stefan Bühler bd40dec873 Only call li_plugins_handle_vrclose in vrequest_free if vrequest is in use 2010-04-03 21:22:02 +02:00
Stefan Bühler 053739a46d [lua]: chunkqueue: fix file<->tempfile handling 2010-03-03 16:27:11 +01:00
Stefan Bühler 25222e9b1c stat-cache: Fix segfault 2010-03-03 11:51:49 +01:00
Stefan Bühler a31b3ee403 [lua]: provide filename to chunkfile for add_temp_file (needed to unlink it) 2010-03-03 11:16:16 +01:00
Stefan Bühler 405c6b26f4 Part 2: [lua]: Add 'add_file' and 'add_temp_file' method for chunkqueue; 'add' only accepts simple strings now 2010-03-02 23:20:07 +01:00
Stefan Bühler 82c2971ddc [lua]: Add 'add_file' and 'add_temp_file' method for chunkqueue; 'add' only accepts simple strings now 2010-03-02 22:50:42 +01:00
Stefan Bühler 48aac3ab07 [stat-cache] Provide blocking cached stat 2010-03-02 22:50:26 +01:00
Stefan Bühler 38ec6b3c2d conditionals: Fix port matching (ntohs) 2010-02-21 14:47:56 +01:00
Thomas Porzelt 5892c78e7d [core] Support req. phys. and resp. abbreviations in li_cond_lvalue_from_string() and make config parser use this function instead of own code 2010-02-21 14:32:58 +01:00
Stefan Bühler 3dc644cf40 Add conditionals for local and remote port (-1 for unix sockets) 2010-02-21 13:45:20 +01:00
Stefan Bühler c0f5b9b151 server.c: free srv->statelock 2010-02-14 21:04:47 +01:00
Stefan Bühler 2c4f6b29a1 Handle NULL values in plugin_core.c 2010-02-14 20:58:27 +01:00
Thomas Porzelt 48913fac46 [core] Fix compiler warning in throttle.c 2010-02-14 20:12:10 +01:00
Stefan Bühler e0370fac79 Fix some lua handling; add args for lua plugins/handlers 2010-02-14 15:48:25 +01:00
Stefan Bühler f43f70de6e [lua] export path_simplify 2010-02-13 22:44:47 +01:00
Stefan Bühler 59835b5eb1 remove content-encoding, transfer-encoding and etag header for generated error bodies 2010-02-13 15:54:59 +01:00
Stefan Bühler d0f6484e7c Move sched_[gs]etaffinity to plugin_core 2010-02-13 15:54:48 +01:00
Stefan Bühler 905a83fc77 Add plugin hooks for server state machine changes 2010-02-13 15:41:09 +01:00
Stefan Bühler 30ebce774e Add "state-wait" api for server state machine 2010-02-13 15:29:21 +01:00
Thomas Porzelt d18045ccbf [core] Rework throttle code a bit, especially regarding pools 2010-02-13 14:30:32 +01:00
Thomas Porzelt fc09bf9095 [core] Don't allow spaces between integer value and its suffix, was not deterministic 2010-02-13 13:25:16 +01:00
Stefan Bühler 048a7d9144 Append to previous buffer in network reads, save used buffer in custom location 2010-02-10 22:25:48 +01:00