Stefan Bühler
76fccefc84
[core] encode path in li_vrequest_redirect_directory
...
To handle whitespace and ? (and other special chars).
Change-Id: Ie597c1d784d42dba70dd21650f5fc9770e9e6547
3 years ago
Stefan Bühler
51a7fd577c
[core]: fix query string handling in li_vrequest_redirect_directory (dirlist, index)
...
- use decoded path instead of orig raw path (which includes the query
string); the decoded path should be safe, and we also really don't
need to support any "raw" handling - we're at the filesystem level
anyway.
Change-Id: Ic9a5b362bea9813873631b18aaa908c59f2bb0a6
3 years ago
Stefan Bühler
535f6b4afb
[streams] improve stream handling, hopefully fixes bug with lingering backend connections
...
- reset backend_source before backend_drain; first tell the backend we
are not interested in data anymore, then force closing the outgoing
data
- as backend_drain might get reopened for a Connection: upgrade, the
backend cannot rely on backend_drain->out.is_closed, but waits for a
disconnect (which will also release the last reference). the same is
done for backend_source, so a backend can just wait for both reference
counts to drop to zero before actually closing the backend connection
(unless it keeps the streams alive itself).
Change-Id: Ibfe7985debd71580dbb78b985abaf946f59e3024
8 years ago
Stefan Bühler
acd2967534
assert many previously unchecked return values, handle some explicitly, remove FD_CLOEXEC in worker - mustn't fork
9 years ago
Stefan Bühler
17a5168793
[core] convert all assert() to LI_FORCE_ASSERT(), and support writing backtraces on fatal errors with libunwind
9 years ago
Stefan Bühler
97dbcf7e42
[core] add option to disable buffering large request bodies on disk - forward them to backend directly instead
...
- right now only mod_fastcgi can handle this (it won't set the CONTENT_LENGTH env var, the backend
has to support this too)
10 years ago
Stefan Bühler
5e4a94b0c6
[core] handle Connection: Upgrade
10 years ago
Stefan Bühler
11b4bdd8c5
replace unneeded ev_/EV_ references
10 years ago
Stefan Bühler
3aa78c1002
wait for request body in dynamic backends, cache them on disk
10 years ago
Stefan Bühler
72ec9a432f
[throttle] rewrite
10 years ago
Stefan Bühler
cfd8955008
[common] implement libev wrapper
...
* need a way to mark a watcher as "don't keep the loop alive"
10 years ago
Stefan Bühler
ff69160c34
[core] Use streams
10 years ago
Stefan Bühler
5d48ae7102
[log] Add changable log contexts (i.e. references to the real one), so a pointer to such context can be used over a longer period of time
11 years ago
Stefan Bühler
d9cc24b8e6
[core]: fix connection/vrequest callbacks to return FALSE after they got reset, so handling stops
13 years ago
Thomas Porzelt
31d2291a1c
[core] Add support for throttling by IP
13 years ago
Stefan Bühler
79d98f5991
[core] Use liJobQueue for vrequest job queue
13 years ago
Stefan Bühler
77ad119f66
[lua]: add subrequests
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
Thomas Porzelt
a4b0f4a9c0
[core] Fix segfault in li_vrequest_reset() when default value is NULL
13 years ago
Stefan Bühler
e00febcd40
Fix vrequest-ref api
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
f14103bc2c
Split options into two categories: simple (int, bool) and ref-counted pointers
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
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
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
a49d51bdd3
Support keep-alive vrequest reset, which keeps some request data to be shown in mod_status
14 years ago
Stefan Bühler
4653900eca
Fix stat-cache ref counting
14 years ago
Stefan Bühler
95e8368099
Fix mod_status handle_direct/WAIT_FOR_EVENT bug
14 years ago
Stefan Bühler
471a521f48
Improve filter handling (handle reverse out stream closing)
14 years ago
Stefan Bühler
7133bae151
Fix vrequest state machine w. waiting actions
14 years ago
Stefan Bühler
616904e00f
Fix filter reset, reactivate check for static file in mod_cache_disk_etag
14 years ago
Stefan Bühler
08bb8f7c23
Some request handling bugs (keep-alive, content-length, pipelining)
14 years ago
Stefan Bühler
d6ff06347d
Handle OPTIONS in vrequest by default, check method in other modules
14 years ago
Stefan Bühler
bf9e34bab7
Remove li_vrequest_stat and fix condition.c
14 years ago
Stefan Bühler
540ff7db02
Split sources into subdirs
14 years ago