Thomas Porzelt
011380dcb7
[core] change memory profiler output, add minsize parameter to debug.profiler_dump action
12 years ago
Thomas Porzelt
cdf183137f
[plugin_core] rename 'blank' action to 'respond' and allow optional integer, string or list of integer+string parameters which support patterns
12 years ago
Thomas Porzelt
cc1c9a92e2
[config parser] don't allow setup blocks or includes in setup blocks
12 years ago
Thomas Porzelt
2ebf367df5
[config parser] fix detection of conflicts between options and uservars
12 years ago
Thomas Porzelt
04c8356b44
[config parser] change syntax again: user defined variables are now defined as 'x = ...;'. user defined actions are not special anymore
12 years ago
Stefan Bühler
abd58794d8
[config parser]: fix crash with nested conditional blocks, fix some warnings
12 years ago
Stefan Bühler
d579b8a163
[core]: accept LF instead of CR LF in http requests
12 years ago
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
12 years ago
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
12 years ago
Stefan Bühler
0fcbfb7ab7
[core] optimize syscalls per connection
12 years ago
Stefan Bühler
45f0cf0bf3
Increase timeout for angel-listen
12 years ago
Stefan Bühler
6164ac83c9
[*cgi env]: Fix REQUEST_URI
12 years ago
Stefan Bühler
d9cc24b8e6
[core]: fix connection/vrequest callbacks to return FALSE after they got reset, so handling stops
13 years ago
Stefan Bühler
bf0ece96fb
[throttle] Fix segfaults
13 years ago
Stefan Bühler
9c6f894eb5
[mime-types] Fix mimetype insert, add new test cases to catch this
13 years ago
Thomas Porzelt
912976fe30
[core] Attempt to fix issue with stalling connections in throttle pools
13 years ago
Stefan Bühler
7a67ba94d7
[autotools]: make sure pkg-config m4 is available in autoconf, check for ragel in ./configure
13 years ago
Thomas Porzelt
c1fe5047be
[plugin_core] Fix cascading in docroot action
13 years ago
Thomas Porzelt
772e66b91c
[core] Immediately rearm throttle pool and update con when inserting into pool
13 years ago
Stefan Bühler
0ab5aee623
[throttle] Fix loop counter (leaded to segfaults)
13 years ago
Stefan Bühler
26d9155e87
[pattern] fix endless (memory eating) loop in pattern parsing
13 years ago
Stefan Bühler
11fa781f98
Fix some warnings found with clang analyzer
13 years ago
Stefan Bühler
2941105e28
[pattern] Fix vr->wrk->tmp_str usage, remove pattern.h from base.h, add pattern support to header.add* actions
13 years ago
Stefan Bühler
db6a989677
Fix some warnings
13 years ago
Stefan Bühler
f521719737
Fix some link problems with -lcrypt
13 years ago
Stefan Bühler
ab9421a5e1
[core] Provide safe wrapper for crypt if crypt_r is not available
13 years ago
Stefan Bühler
67fcc00125
[pattern] Fix regex nth callback, activate env-set pattern range tests
13 years ago
Stefan Bühler
97d6300c62
[plugin_core] Support %n in all pattern evals
13 years ago
Stefan Bühler
01f0c1606f
[core] Fix pattern range parser, fix docroot_nth callback
13 years ago
Stefan Bühler
177fc95219
[core] Add phys.docroot and phys.pathinfo
13 years ago
Stefan Bühler
52584c99bb
[pattern] Add ranges (and fix match-info handling)
13 years ago
Stefan Bühler
eecf0d90be
[pattern] Fix handling of escaped characters
13 years ago
Stefan Bühler
688a17372f
[tests] Add BadRequest test (and fix the bug), add "status" vhost
13 years ago
Stefan Bühler
d6820e5cfd
[pattern] Hide pattern-part struct
13 years ago
Thomas Porzelt
ce4f9391e3
[core] Fix tiny leak in pattern code when parse errors happen
13 years ago
Thomas Porzelt
efb04f1f13
[config parser] include: Log warning if no file matches wildcard, error if no wildcard and file not found
13 years ago
Stefan Bühler
c35cf21c52
[log] Add basic api to open log files via angel
13 years ago
Stefan Bühler
97088f667e
Fix typos / missing includes
13 years ago
Stefan Bühler
de43e75b75
[core] Disable mmap as we don't handle SIGBUS yet
13 years ago
Thomas Porzelt
31d2291a1c
[core] Add support for throttling by IP
13 years ago
Stefan Bühler
8ae6902602
[core] remove lighttpd-glue.h from base.h
13 years ago
Stefan Bühler
3b1a781381
[core] remove encoding.h from base.h includes
13 years ago
Stefan Bühler
7fbcfb86d9
[mod_openssl]: better io event handling (ssl may want to write while lighty only wants to read)
13 years ago
Stefan Bühler
0247ee879f
[angel/core]: remove old unix socket before binding
13 years ago
Stefan Bühler
876261c62c
[core/angel]: Use strict ip matching (family must match, no IPv4-mapped IPv6)
13 years ago
Stefan Bühler
14660bee4f
[core/angel]: support unix socket listen
13 years ago
Stefan Bühler
823b9d13c2
[core]: wait for connections before shutdown
13 years ago
Thomas Porzelt
47bc318a35
[core] Make li_server_ts_format_add() threadsafe
13 years ago
Thomas Porzelt
14d48527af
[core] Make log.timestamp creation/destruction threadsafe
13 years ago
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
13 years ago
Thomas Porzelt
587c7383ba
[core] Add support for req.env/header[key] to patterns
13 years ago
Thomas Porzelt
f088e43f62
[plugin_core] Add env.set/add/remove/clear actions
13 years ago
Thomas Porzelt
a3b7ce74af
[core] Rework throttle-pool handling to be thread-safe in creation/destruction aswell as more accurate and fair throttling
13 years ago
Stefan Bühler
abdd422aa9
plugin.c: fix optionptr mem-leak
13 years ago
Stefan Bühler
b29c8161f1
Fix mimetypes
13 years ago
Stefan Bühler
be65208143
waitqueue: modify callback
13 years ago
Thomas Porzelt
c7a39e4da1
[core] Fix compilation on non-linux systems
13 years ago
Thomas Porzelt
0eaed50c1c
[core] Use uintptr_t instead of guintptr as it requires an otherwise unneeded recent glib version
13 years ago
Stefan Bühler
9ba3395241
Fix C++ style comments
13 years ago
Stefan Bühler
91fda70bca
[plugin_core] Fix mixed declarations and code
13 years ago
Stefan Bühler
7d938e48e3
[log] Fix prepare handler
13 years ago
Stefan Bühler
79d98f5991
[core] Use liJobQueue for vrequest job queue
13 years ago
Thomas Porzelt
582dfa99d7
[core] Rework mimetype lookup code
13 years ago
Thomas Porzelt
9c63e60cb7
[core] Add workers.cpu_affinity setup action
13 years ago
Stefan Bühler
b9af60f92d
[plugin_core]: don't stat last entry in docroot list, it is used anyway
13 years ago
Stefan Bühler
d133b8ad8c
[lua]: add subrequst_lua.c
13 years ago
Stefan Bühler
77ad119f66
[lua]: add subrequests
13 years ago
Stefan Bühler
1c3d3c287f
[core]: add tasklet pools to workers and use them for stat-cache
13 years ago
Stefan Bühler
6f454d0008
[plugin_core]: add "static_no_fail" action, which doesn't return 403/404 so other actions can handler the request
13 years ago
Stefan Bühler
c3164aba8b
Move binary names: angel becomes lighttpd2, worker lighttpd2-worker
13 years ago
Stefan Bühler
b8a0921265
Add some missing LI_/li prefixes for types and enum values
13 years ago
Stefan Bühler
b87e74d151
Optimize IO handling to safe syscalls; run vrequest state machines twice before looking for new io events
13 years ago
Stefan Bühler
b876f8401d
[core]: rework connection/vrequest structs; add liConInfo
13 years ago
Stefan Bühler
cae0c15710
Optimize some string handling in chunk parser
13 years ago
Stefan Bühler
254ba2a1f6
Optimize header insertion
13 years ago
Stefan Bühler
cc0044c4ee
Fix http method parser, add inlined g_string_append_len
13 years ago
Stefan Bühler
a2ed50dedd
Optimize some socket initialization handling
13 years ago
Stefan Bühler
7bb671de4c
[config parser] fix operators
13 years ago
Stefan Bühler
b7e6ba4eb5
condition.c: set match_type in all cases
13 years ago
Stefan Bühler
8b17198eb6
Try to fix some bugs in the config parser
13 years ago
Thomas Porzelt
2885c88ae7
[core] Config parser: one more fix for condition parsing
13 years ago
Thomas Porzelt
5b9cc67ad5
[core] Config parser: fix a whitespace handling bug
13 years ago
Thomas Porzelt
7648ef0f40
[core] Config parser: Fix parsing rules for multiple else-if conditions
13 years ago
Thomas Porzelt
45d9fda41e
[core] Config parser: fix condition with key handling
13 years ago
Stefan Bühler
18fd43840c
[mod_balancer] fix typo, and fix balancer handling in action-stack
13 years ago
Stefan Bühler
dd0bee3fd6
action_stack: fix balanacer management
13 years ago
Thomas Porzelt
ab94d8390d
[core] Change *bit integer suffixes in config parser
13 years ago
Thomas Porzelt
5f655d3b6e
[core] Fix 'else if' handling in config parser
13 years ago
Thomas Porzelt
65a3d5dfa9
[core] Add support for 'and' and 'or' in conditions to the config parser
13 years ago
Thomas Porzelt
e2a551298e
[core] Use liCond* helpers in li_pattern_parse/eval
13 years ago
Thomas Porzelt
c8663ffda9
[core] Allow disabling of stat cache through stat_cache.ttl 0;
13 years ago
Stefan Bühler
c23509424d
pattern: check for NULL in li_pattern_free
13 years ago
Thomas Porzelt
a4b0f4a9c0
[core] Fix segfault in li_vrequest_reset() when default value is NULL
13 years ago
Thomas Porzelt
43def72d5b
[core] Fix tiny leak in docroot action
13 years ago
Thomas Porzelt
a5f6e08abd
[core] Fix for last commit: undefined flag with older libev headers so have to use makros
13 years ago
Thomas Porzelt
396f740e77
[core] Use EVFLAG_NOSIGFD to disable signalfd usage if libev 3.8 is used, it breaks signal handling
13 years ago
Thomas Porzelt
e2faced3dd
[core] Fix worker timestamp cache initialization resulting in segfault when a module adds a new formatter (e.g. mod_accesslog)
13 years ago
Thomas Porzelt
0b860b2a0c
[core] Ensure a connection is put into io timeout queue after keepalive]
13 years ago
Thomas Porzelt
5531e36cf4
[core] Ensure that a connection is always in the io timeout queue (if not in keep-alive)
13 years ago
Thomas Porzelt
bba88e3326
[core] Fix detection of too big request http header
13 years ago
Thomas Porzelt
6060380550
[core] Small fix for keepalive handling
13 years ago
Thomas Porzelt
39df9263fb
[plugin_core] Add support for patterns to log.write action
13 years ago
Thomas Porzelt
013297bc9b
[core] Ignore callbacks if NULL in pattern_eval()
13 years ago
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
13 years ago
Thomas Porzelt
7056b879e7
[core] Fix detection of too large http request header
13 years ago
Thomas Porzelt
7409b2ef63
[plugin_core] Enable 'docroot' action to use patterns and even traverse a list of these
13 years ago
Thomas Porzelt
3668ef97ab
[core] Add liPattern type and associated functions
13 years ago
Stefan Bühler
5e063e2b04
[core] Enable li_plugins_init_lua again, fixed segfault
13 years ago
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)
13 years ago
Thomas Porzelt
b5009f18df
[core] Fix usage of sched_setaffinity() and disable it for now as it seems to impose a little performance hit
13 years ago
Thomas Porzelt
91cc6e06bb
[waf] Don't compile profiler.c or link libexecinfo on FreeBSD when not using --with-profiler
13 years ago
Thomas Porzelt
5646b353ea
[core] Specify file permissions when creating profiler output file
13 years ago
Thomas Porzelt
c8a23a947f
[core] Check if profiler output file has been truncated since opening
13 years ago
Stefan Bühler
e00febcd40
Fix vrequest-ref api
13 years ago
Stefan Bühler
c2271c15c3
Add plugin init-lua hook
13 years ago
Stefan Bühler
4afebee1c7
Make profiler optional
13 years ago
Thomas Porzelt
727a480a14
[core] Remove profile_mem action from core plugin, was moved to mod_debug
13 years ago
Thomas Porzelt
bf632326a7
[core] Update and start (if necessary) io timeout in li_worker_run() fixing first worker ignoring io.timeout from config
13 years ago
Thomas Porzelt
de3515cd27
[waf] Add check for and link against libexecinfo on FreeBSD
13 years ago
Thomas Porzelt
f285ad372e
[core,waf,autoconf,cmake] Add check for execinfo.h and disable stacktraces in profiler if not available
13 years ago
Thomas Porzelt
fa1c73cbe6
[core] Make profiler output to file, fix small issue with profiler_try_realloc()
13 years ago
Thomas Porzelt
1dfa1c37f2
[core] Reworked memory profiler. Commited only very simple version tracking allocated objects and printing backtraces for leaked ones upon exit
13 years ago
Thomas Porzelt
c0e7ef3654
[core] Fix memleak in filter_buffer_on_disk/bod_open() and free srv->optionptrs on exit
13 years ago
Stefan Bühler
b144242a07
Fix timestamp handling a little bit
13 years ago
Stefan Bühler
26942e6b6c
Fix dangling references to action stack
13 years ago
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
13 years ago
Thomas Porzelt
86e039e6d2
[core] Add --module-resident commandline parameter to prevent module unloading. Useful for valgrind or tcmalloc
13 years ago
Stefan Bühler
46b9a28f87
Fix pathinfo; action to remove the pathinfo from the url too (for SCRIPT_NAME)
13 years ago
Thomas Porzelt
bf2d01e56c
[core] Ensure that a connection is always in the io timeout queue when not in keep-alive state
13 years ago
Thomas Porzelt
9d14c6bce7
[core] Send Content-Type text/html for generated error pages
13 years ago
Thomas Porzelt
0af117d47f
[core] Reposition check for header size limit fixing wrong positives
13 years ago
Thomas Porzelt
683e334599
[plugin_core] Return error 405 for methods other than GET or HEAD on static files
13 years ago
Thomas Porzelt
ad8570423a
[core] Add li_http_method_from_string() function
13 years ago
Stefan Bühler
19bc091432
Only call li_plugins_handle_vrclose in vrequest_reset if vrequest is in use
13 years ago
Stefan Bühler
bd40dec873
Only call li_plugins_handle_vrclose in vrequest_free if vrequest is in use
13 years ago
Stefan Bühler
053739a46d
[lua]: chunkqueue: fix file<->tempfile handling
13 years ago
Stefan Bühler
25222e9b1c
stat-cache: Fix segfault
13 years ago
Stefan Bühler
a31b3ee403
[lua]: provide filename to chunkfile for add_temp_file (needed to unlink it)
13 years ago
Stefan Bühler
405c6b26f4
Part 2: [lua]: Add 'add_file' and 'add_temp_file' method for chunkqueue; 'add' only accepts simple strings now
13 years ago
Stefan Bühler
82c2971ddc
[lua]: Add 'add_file' and 'add_temp_file' method for chunkqueue; 'add' only accepts simple strings now
13 years ago
Stefan Bühler
48aac3ab07
[stat-cache] Provide blocking cached stat
13 years ago
Stefan Bühler
38ec6b3c2d
conditionals: Fix port matching (ntohs)
13 years ago
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
13 years ago
Stefan Bühler
3dc644cf40
Add conditionals for local and remote port (-1 for unix sockets)
13 years ago
Stefan Bühler
c0f5b9b151
server.c: free srv->statelock
13 years ago
Stefan Bühler
2c4f6b29a1
Handle NULL values in plugin_core.c
13 years ago
Thomas Porzelt
48913fac46
[core] Fix compiler warning in throttle.c
13 years ago
Stefan Bühler
e0370fac79
Fix some lua handling; add args for lua plugins/handlers
13 years ago
Stefan Bühler
f43f70de6e
[lua] export path_simplify
13 years ago
Stefan Bühler
59835b5eb1
remove content-encoding, transfer-encoding and etag header for generated error bodies
13 years ago
Stefan Bühler
d0f6484e7c
Move sched_[gs]etaffinity to plugin_core
13 years ago
Stefan Bühler
905a83fc77
Add plugin hooks for server state machine changes
13 years ago
Stefan Bühler
30ebce774e
Add "state-wait" api for server state machine
13 years ago
Thomas Porzelt
d18045ccbf
[core] Rework throttle code a bit, especially regarding pools
13 years ago
Thomas Porzelt
fc09bf9095
[core] Don't allow spaces between integer value and its suffix, was not deterministic
13 years ago
Stefan Bühler
048a7d9144
Append to previous buffer in network reads, save used buffer in custom location
13 years ago
Stefan Bühler
13611b5243
Improve balancer handling
13 years ago
Stefan Bühler
2e131dc93f
Put pathinfo debug messages into debug-request-handling
13 years ago
Thomas Porzelt
6a5411c2f1
[plugin_core] Set con->throttle.pool.queued to FALSE after unlinking from queue
13 years ago
Thomas Porzelt
1297a1fab7
[core] Fix crash in throttle pool handling
13 years ago
Stefan Bühler
750bd453a2
Append to previous buffer in network reads
14 years ago
Thomas Porzelt
d8f5d21ec6
[core] Check for EV_ERROR in connection event callback
14 years ago
Stefan Bühler
7bb58debcb
Fix previous commit: only update io-timeout timestamp after real IO
14 years ago
Stefan Bühler
8cf1033e4a
Only update io-timeout timestamp after real IO
14 years ago
Stefan Bühler
3c2cef5f0d
Handle ETIMEDOUT as connection close
14 years ago
Stefan Bühler
64c2fece96
config: add network cidr matching operators, =/ and !=
14 years ago
Stefan Bühler
00ef8599cf
Export glib md5/sha1/sha256 hash functions to lua (hex output)
14 years ago
Stefan Bühler
5284ce9cb4
Fix option handling: need another opt_base_index for pointer options
14 years ago
Stefan Bühler
2e4aba7e39
Fix options: missed setting "pointer" options
14 years ago
Stefan Bühler
f14103bc2c
Split options into two categories: simple (int, bool) and ref-counted pointers
14 years ago
Stefan Bühler
64ba5fddce
Cleanup value pointer extractions
14 years ago
Stefan Bühler
cdb615293c
[autobuild] Fix dependency problem with automake (automake doesn't like it if ../dir/ is cwd)
14 years ago
Stefan Bühler
edd74a0e3c
Rename lighttpd to lighttpd2
14 years ago
Thomas Porzelt
9bd5c39550
[core] Add vr->ts_started struct member, representing the ev_tstamp when the vr has been started
14 years ago
Thomas Porzelt
8716087728
[core] Rename con->ts to con->ts_started
14 years ago
Stefan Bühler
4fd27aca81
autotools: Fix linking
14 years ago
Stefan Bühler
63eadd22fa
Fix buildsystems
14 years ago
Stefan Bühler
fe7ddede88
Add lua plugins
14 years ago
Stefan Bühler
b4c3e2ba02
Add userdata to action-create, setup and plugin-init callbacks
14 years ago
Stefan Bühler
881669d96a
Add lua filters; fixed some lua-api bugs; enhanced lua chunkqueue api
14 years ago
Stefan Bühler
3d50819d14
Move the cqlimit reset/set back to connection.c (vrequest_reset may be called with data in con->raw_in, so cqlimit_reset isn't a good idea)
14 years ago
Stefan Bühler
402c45dc45
Add buffer-on-disk for uploads automatically
14 years ago
Stefan Bühler
2f06283832
Change internal conditional checks; export functions to read value of conditional-lvalues
14 years ago
Stefan Bühler
b332fcbbb8
Add api for buffering chunkqueue content on disk
14 years ago
Stefan Bühler
3bc425fef1
Remove config parser code from main(), add cmake-option to disable default config parser
14 years ago
Stefan Bühler
eff8ed5e50
Add request.environment[] conditional
14 years ago
Stefan Bühler
871a4dc8b5
Add unit-testing for range-parser and fix the parser
14 years ago
Stefan Bühler
c5f6c3166d
Replace lseek()+read() with pread() in chunk.c
14 years ago
Stefan Bühler
0c3ca6b13b
add liBuffer: a reference-counted memory chunk (using mempool) for basic network data
14 years ago
Stefan Bühler
f9b12036fe
Add mempool allocator to avoid fragmentation
14 years ago
Thomas Porzelt
b79cda7fce
[core] Limit outgoing chunkqueue mem usage to 512kb by default
14 years ago
Thomas Porzelt
477a060821
Fix typo in previous commit
14 years ago
Thomas Porzelt
cb7005bdf0
[core] Fix io.buffer_in action (was setting out buffer)
14 years ago
Stefan Bühler
8f69c6bc8d
Reduce buffer allocs for network read
14 years ago
Stefan Bühler
1ac09ac2d1
Use relative timestamp for angel call timeouts, increase angel-listen timeout.
...
* While lighty runs the initialization, the difference between ev_now()
and ev_time() might be bigger than the timeout - which leads to an
immediate timeout.
14 years ago
Thomas Porzelt
9989cd62ce
[core] Fix value statements in config parser (now using stack for operator)
14 years ago
Stefan Bühler
49a99eb0e8
Fix handling of responses without body; check that really no content is sent.
14 years ago
Stefan Bühler
951c7e4e8d
Fix memleak in lua vr:stat()
14 years ago
Stefan Bühler
8a8fb91729
Add some features to mod_dirlist, move directory-redirect to vrequest functions and use it for index files
14 years ago
Stefan Bühler
619a2d6582
stat-cache: close file if fstat fails
14 years ago