2
0
Fork 0
Commit Graph

1638 Commits (10586541b506ec4a79d4a2bf6c9f80a88b60c2a4)

Author SHA1 Message Date
Stefan Bühler 10586541b5 [tests] remove concept of feature_check - always test everything
Change-Id: Id2d0878263f41e38c2ce4ee57ac34f8f7724c71a
2023-01-15 12:14:15 +01:00
Stefan Bühler c691084b48 [tests] use local fcgi-cgi written in python
Change-Id: I305d1e67d7799d8edd3f9d4516c7412ba4c7db1b
2023-01-15 12:12:37 +01:00
Stefan Bühler 24025686d4 [core] stream plug should forward "abort" to dest (source disconnect before closing)
Change-Id: I7c5691c1aa720ebf66987be0d02919103b4106e3
2023-01-08 14:29:17 +01:00
Stefan Bühler 0ff166282f [core] stream plug should stop when source disconnects too
Change-Id: Iedf508275ab39ac5b98dfe3a76873140a0dfa333
2023-01-08 01:25:37 +01:00
Stefan Bühler 56aae45f6d [mod_debug] support repeating output of pending events on stop
Change-Id: I6f4d79323e53d2e2084a0db9fa4dda6e4acd2e10
2023-01-07 19:54:11 +01:00
Stefan Bühler 42d554bd3e [angel] fix use-after-free of cached listening sockets
On stop the cached listenings sockets were freed through the hashtable;
but they are actually refcounted, and the hashtable only has a "weak"
reference (which gets cleared once all strong references are dropped).

Change-Id: I5f9c14f1c1e28f3a2b73955e69e36e1f9dae5780
2023-01-07 15:49:46 +01:00
Stefan Bühler 6791ccbaec [angel] fix handling of notifications on worker stop
* fix handling of "simple calls" (notifications)
  when plugin/action can't be found (must not send
  an error response, as id == -1)
* server stop clears all plugins; don't log error in
  that stage

Change-Id: If5167a3bd6d069c4cfc6dad13e205ce18b724509
2023-01-07 15:49:46 +01:00
Stefan Bühler 87e125bffa [tests] package moved python files
Change-Id: I0dbb2248b6001f47c5284edb26e5a38d33326b23
2023-01-07 13:59:00 +01:00
Stefan Bühler cbcc2e48a9 [core] use union of sockaddr_* pointers instead of pointer to storage union
We didn't allocate the full storage, which the compiler complained
about.
Keep using a storage type when we actually allocate / use the full
type.

Change-Id: I25dba8af09f772852eabbd113f101c200491e44b
2023-01-07 13:38:08 +01:00
Stefan Bühler 5a02032485 [tests] refactor python tests
* try to adapt a more modern python style
* add flake8 linting and mypy type checking
  * add many type hints
  * dataclasses
  * various refactorings to make proper type hints possible
* use f-strings for formatting instead of `%` and `.format`
* get rid of `Env` global; pass it explicitly or use a ContextVar
* use metaclass to automatically register test cases

Change-Id: I19d6223157b769cb6491c032d3ec9eb2cd70ef44
2023-01-06 20:25:34 +01:00
Stefan Bühler a5e8c80bf8 [tests] reorganize python tests
Change-Id: I7127b0e1cd16f713bca7310c04bd049aa2f74570
2023-01-05 14:00:23 +01:00
Stefan Bühler f046f4fac1 [core] improve comments
Change-Id: If1d107d3a2534197be213246c7b3e4d5e7af6de8
2023-01-05 12:52:27 +00:00
Stefan Bühler a615411747 fix spelling
Taken from https://github.com/lighttpd/lighttpd2/pull/12 by Josh Soref

Change-Id: I28ebf617e6fd4ae71671130af622f56f055bb578
2023-01-05 12:52:13 +00:00
Stefan Bühler b96d2495f4 [core] remove HEDLEY_FALL_THROUGH from empty case
Change-Id: Ie406c9719ce24f85c9220ee9b1fa0775ec986c04
2023-01-05 12:48:52 +00:00
Stefan Bühler 2879d7ccc2 [tests] use raw tcp for bad url request test
curl doesn't allow urls with spaces anymore (which is a good thing)

Change-Id: Id735a6e5d37a19a5ad4efc46830f8ec63a427415
2023-01-05 12:39:36 +00:00
Stefan Bühler 29e57d3005 [core] re-enable listening sockets
make sure to check once a second whether we can re-enable the listening
sockets.

Change-Id: Ib9844c183de2b8a8bd00bafebdca348b88f71314
2021-09-15 12:19:01 +02:00
Stefan Bühler 2ae359b04a [doc] fix ino/dev field in lua stat, add lighty.path_simplify to global methods
Change-Id: I76ad8233d0ea1a934d0812c9a8c93fa97317344d
2021-08-12 17:12:04 +02:00
Stefan Bühler f25bc4106f [core] fix li_path_simplify comment: always operating in-place
Change-Id: Idb657f798516b0d2ed53fb0b2cfecbcbbe801c00
2021-08-12 17:11:28 +02:00
Stefan Bühler ad66680e62 [core] put HEDLEY_NO_RETURN at front of declaration
Change-Id: I5fa705453e33567df6ab75b5fe3eb6ae2221895b
2021-08-08 16:26:52 +02:00
Stefan Bühler ff500e9c8b [core] use IPPROTO_TCP instead of SOL_TCP for TCP_FASTOPEN (#3071)
Change-Id: I2b3b4a62c434c3a8b972d2e6bd09730e004514d0
2021-08-08 14:34:47 +02:00
Stefan Bühler b006006131 [core] support workers.cpu_affinity on FreeBSD (#3071)
Change-Id: I37dbbf8aa1053cd96573256df964c5babe826566
2021-08-08 14:26:56 +02:00
Stefan Bühler a5c2238277 [core] check cpu index in cpu_affinity handling
Change-Id: I548939dc33b97757ec93637a3b265f1d9620a8aa
2021-08-08 14:25:35 +02:00
Stefan Bühler 54d7b46774 [lua] protect setup and action metatable
Change-Id: I3cba403ad9bdfc3025cdb801d194b12e420ee0c0
2021-08-05 17:10:46 +02:00
Stefan Bühler 3bf903c398 [lua] provide and use li_lua_new_protected_metatable to prevent tampering with metatables
Change-Id: Ifda5a1465c8fc291f0f09490a9f6e2c3f6b27504
2021-08-05 16:06:48 +02:00
Stefan Bühler 53337c81d4 [lua] prevent tampering with global "lighty" table
Change-Id: If92ea8d7b58868904ab6d1ffaa27534cb09b7d29
2021-08-05 15:27:44 +02:00
Stefan Bühler 5977493f47 [lua] one li_lua_init_*_mt function per "file", add a few missing ones
Change-Id: I95661db55debe76c0aca99b2920ce202af7d9967
2021-08-05 14:45:54 +02:00
Stefan Bühler 7aec09dd27 [lua] split all metatable init/create code into separate functions
- lua_push_*_metatable and init_*_mt (init only used by push)

Change-Id: I42a3d58b884205f30e4ee9a99c693ce65e9dbf66
2021-08-05 13:55:29 +02:00
Stefan Bühler 4a4fd8fd11 [core] include and use hedley (v15) header
hedley is a single header to handle compiler-specific features:
https://nemequ.github.io/hedley/

Prefer headly macros over glib for now.

Change-Id: I3c67ebee0d43e27fde6402d47788e1045144e864
2021-08-05 12:29:46 +02:00
Stefan Bühler b41e02860c [mod_proxy] fall back to waiting for connection close if no message length indicator is found in HTTP/1.1 response
It seems this is actually allowed by the RFCs; although it is intended
as HTTP/1.0 backward compatibility, and HTTP/1.1 servers (backends)
really should do better.

Change-Id: I93265bfe7fae57beb10d70d3a4596c5cae7b51bd
2021-07-18 12:08:52 +02:00
Stefan Bühler b033a4fcb4 [test] enable TestRedirectDirWithQueryAndSpecialChars
Change-Id: Ic649c1e4ea158853c362836f31f6ec7e250413cd
2021-05-03 23:26:51 +02:00
Stefan Bühler 140a3c9018 fix refcount issue: don't drop rc in li_iostream_reset
... so li_stream_simple_socket_close doesn't need to acquire (when the rc might already be 0).

Instead call li_iostream_reset in all places that didn't acquire before,
and drop the acquire.

Change-Id: I347f49eb57989738ed811a1f3a31b8942ff32881
2021-05-03 23:24:48 +02:00
Stefan Bühler 850aea7a5d [build] enable all "main" features by default
Change-Id: I9bf8ee3f4bfc6736f5fc5aea6b3958ee298c65d6
2021-02-28 20:02:44 +01:00
Stefan Bühler 21865cbbd2 [autobuild] install and use glib tap helpers, replaces gtester
Change-Id: I889eba5be61a1c2b89f9f53b38abbba201625b6b
2021-02-28 19:53:38 +01:00
Stefan Bühler 2a4744a677 [autobuild] raise autoconf min version, fix various deprecated macros
Change-Id: Ic7ae8f7bb0720ba4e6b965f1951f091cf03f6b83
2021-02-28 19:35:24 +01:00
Stefan Bühler c8bf635551 [tests] fix memcached and scgi-envcheck for python3; use asyncio
Change-Id: If3be7d98701d90c0374f625d1571140a100009df
2021-02-28 16:24:14 +01:00
Stefan Bühler 98ea1dc7de [contrib] add overrides for new mime types, regenerate mimetypes.conf
Change-Id: I6e0116b1f227c96eb98a6e45300030bc5cde72fd
2021-02-28 13:58:45 +01:00
Stefan Bühler 424e1a37f8 [core] Reset con->out (response body) queue counters (used by mod_accesslog) for keep-alive
Change-Id: Id644a71c808c8a3c73e476fddb6022177de8dd5f
2021-02-28 12:38:33 +00:00
Stefan Bühler d544ee105d [core] docs say empty log targets request not logging; actually implement that (went to stderr)
Change-Id: If71dc0b309c4e8221ecef877202d9a1a571ad5c6
2021-02-28 13:28:00 +01:00
Stefan Bühler 7a343d4765 [mod_acceslog]: fix log target reference in docs
Change-Id: If390d666db5e4952a64d545eb77ddf6e8f7ed9df
2021-02-28 11:45:03 +01:00
Stefan Bühler a5d3e11c1f [tests] add tests for mod_dirlist
Change-Id: I5d6ea970cd5dca7e202c8bd888142e44ef8f4211
2020-06-22 20:38:47 +02:00
Stefan Bühler 76fccefc84 [core] encode path in li_vrequest_redirect_directory
To handle whitespace and ? (and other special chars).

Change-Id: Ie597c1d784d42dba70dd21650f5fc9770e9e6547
2020-06-22 20:36:58 +02:00
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
2020-06-22 20:27:41 +02:00
Stefan Bühler 92681fcde4 [tests] fix PrepareDir
Change-Id: Idb26de002ad1586101c9e9bdb0256170b8e287b9
2020-06-22 19:59:43 +02:00
Stefan Bühler 505bfb053f [core] move CGI environment creation to core
Change-Id: Ia826381365a04352249321097fda57f704984821
2019-08-31 13:48:17 +02:00
Stefan Bühler 8989ca32d4 [mod_{fast,s}cgi] support REQUEST_SCHEME cgi variable
Change-Id: I4750086962ee50a530694309ec8a6165eddabcf3
2019-08-31 13:08:11 +02:00
Stefan Bühler afaf285bfb [core] fix chunk decoding bug: reused stale context after forwarding chunk data
Change-Id: Ie37e3c2d605ae23dcb7a6b74ff6b5f0699074ac5
2019-08-26 00:36:59 +02:00
Stefan Bühler 7078063491 [core] fix parsing of chunk digits
Change-Id: I8fd5b916172c432b63329078e261a8ed5eff23dc
2019-08-26 00:15:27 +02:00
Stefan Bühler a41b92eb8a [core] fix segfault in http response streaming
Change-Id: I61a0167d8a7fdede96075960f5099b33c0a8ab02
2019-08-25 19:25:02 +02:00
Stefan Bühler d8bd405a19 [core] fix crash when HTTP backend "Upgrade"s
Change-Id: If7143f49baa2efa8d1fb3f78c6390969730c678e
2019-08-25 13:07:49 +02:00
Stefan Bühler bffe96f5d0 [build] sync extra warning flags between cmake and autobuild
Change-Id: I4165d22ef944b959f9acd8f57c3d7658049b39f0
2019-08-25 12:16:19 +02:00