Commit Graph

389 Commits

Author SHA1 Message Date
5f4978a14a * Avoid "may be uninitialized" warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898731 13f79535-47bb-0310-9956-ffa450edef68
2022-03-08 13:01:25 +00:00
3e561918fb mod_lua: Error out if lua_read_body() or lua_write_body() fail.
Otherwise r:requestbody() or r:parsebody() failures might go unnoticed for
the user.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898689 13f79535-47bb-0310-9956-ffa450edef68
2022-03-07 14:07:02 +00:00
e61f23ee40 ap_lua_init_mutex() is not about thead only . It also calls
apr_global_mutex_child_init(). So I see no good reason to skip this hook
if !APR_HAS_THREADS.

Some #if APR_HAS_THREADS are also already in place in
ap_lua_init_mutex() anyway.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898453 13f79535-47bb-0310-9956-ffa450edef68
2022-02-27 09:12:13 +00:00
e1a199e8fd * Improve error handling
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895970 13f79535-47bb-0310-9956-ffa450edef68
2021-12-15 08:28:11 +00:00
8951949163 core/ap_ssl_*: changes after review by rpluem
- removed no longer needed (char*) casts when looking
   up ssl variables.
 - move 'goto cleanup;' on separate source line
 - fixed check for wrong optional function in ap_run_ssl_var_lookup
 - remove ap_bytes_t again from httpd.h and passes now ocsp
   identifier as separate const char* and apr_size_t. This
   follows more how such data is passed in the rest of the
   server.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1889009 13f79535-47bb-0310-9956-ffa450edef68
2021-04-20 12:16:05 +00:00
2d2e2aee89 Fixing mod_lua to use new http_ssl.h header file as well.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1888084 13f79535-47bb-0310-9956-ffa450edef68
2021-03-26 11:44:30 +00:00
7c5e4c9ab2 Using the new ap_ssl_conn_is_ssl() and ap_ssl_var_lookup() in all internal modules.
* leaving mod_nw_ssl and mod_ssl itself untouched
 * removing mod_ssl.h includes where no longer necessary
 * some modules might skip post_config hooks, but those were left in, even when empty now.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887364 13f79535-47bb-0310-9956-ffa450edef68
2021-03-09 12:55:55 +00:00
03b458e0e2 Add missing comma in some 'apr_apr_psprintf()' call if APR_HAS_THREADS is not defined
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1882060 13f79535-47bb-0310-9956-ffa450edef68
2020-09-27 09:00:35 +00:00
242d341756 Add missing "const" or "static const" qualifiers in some command_rec
definitions.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1882053 13f79535-47bb-0310-9956-ffa450edef68
2020-09-27 07:52:55 +00:00
4b34368df5 Restore broken win32 build, include apr/std headers before httpd headers
- In httpd we override exit() to trap the true exit code (see os/win32/os.h)
 - process.h was redefining exit() which picked up the macro instead of the
   original exit() declaration
 - Cleaner style pulls in apr, then standard C headers, and finally sets down
   the httpd includes on top of these, resolving the windows build regression




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1881477 13f79535-47bb-0310-9956-ffa450edef68
2020-09-05 05:20:59 +00:00
45a01f2a80 * Correctly define lua_resume for Lua <= 5.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1880924 13f79535-47bb-0310-9956-ffa450edef68
2020-08-17 11:05:44 +00:00
774a63154d improve Lua 5.4 handling
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1880743 13f79535-47bb-0310-9956-ffa450edef68
2020-08-10 14:45:14 +00:00
53b5c234e9 Support building against Lua 5.4 by adjusting to the 3-arg form of
lua_resume().

* modules/lua/config.m4 (CHECK_LUA): Check for lua5.4 paths.

* modules/lua/mod_lua.c (lua_output_filter_handle,
  lua_input_filter_handle): Check that exactly one item is on the
  stack as indicated by lua_resume().

Submitted by: Lubos Uhliarik <luhliari redhat.com>, jorton
PR: 64591
Github: closes #130, closes #133, closes #134


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1880678 13f79535-47bb-0310-9956-ffa450edef68
2020-08-07 12:21:35 +00:00
3c47401358 Declare pre_translate hook in lua/info/log_debug/example modules, and docs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879077 13f79535-47bb-0310-9956-ffa450edef68
2020-06-22 10:34:28 +00:00
8e9ac92fe7 add r/o iterable tables
The current apr tables exposed support get/set but we cannot get the keys
or iterate. add _table() alternatives




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1872455 13f79535-47bb-0310-9956-ffa450edef68
2020-01-07 19:18:13 +00:00
659cf30d6f PR63971 expose apr_table_unset for headers/envvars
via nil assignment



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1870650 13f79535-47bb-0310-9956-ffa450edef68
2019-11-30 20:28:36 +00:00
e3f96299c0 * modules/proxy/mod_proxy.c (create_proxy_config): Tag the pool.
* modules/lua/mod_lua.c (lua_post_config, create_vm_spec): Tag pools.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1862051 13f79535-47bb-0310-9956-ffa450edef68
2019-06-25 10:57:00 +00:00
d844a8e128 Fix comment in mod_lua and docs.
s/addoutputfilter/add_output_filter/
See PR 62359

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837404 13f79535-47bb-0310-9956-ffa450edef68
2018-08-04 07:47:47 +00:00
c7c68752c8 Fix PR54848 in a 2.4.x backportable format. Ideally deprecating the use
of ->client in whatever version of 2.4 this is added into would be
more logical.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837225 13f79535-47bb-0310-9956-ffa450edef68
2018-08-01 11:27:28 +00:00
e10f5c32c0 Function used as 'apr_reslist_destructor' when calling 'apr_reslist_create()' should have the following prototype:
apr_status_t (*apr_reslist_destructor)(void *resource, void *params, apr_pool_t *pool);

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1834226 13f79535-47bb-0310-9956-ffa450edef68
2018-06-23 21:52:09 +00:00
3e56c5b221 Fix some typos reported in PR 59998
Most add already been fixed when PR 59990 had been applied on trunk. 

Thx klemens

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827669 13f79535-47bb-0310-9956-ffa450edef68
2018-03-24 20:05:19 +00:00
212884210c * modules/lua/config.m4 (CHECK_LUA): Support Debian-style
pkg-config naming for lua.

Reviewed by: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1826206 13f79535-47bb-0310-9956-ffa450edef68
2018-03-08 11:27:48 +00:00
7c00119df1 * modules/lua/config.m4: Use liblua paths from pkg-config if
available.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1825147 13f79535-47bb-0310-9956-ffa450edef68
2018-02-23 17:53:09 +00:00
ecce8ad8cb * modules/lua/config.m4: Link mod_lua against -lcrypt if available,
since mk_password_hash() can use crypt().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822305 13f79535-47bb-0310-9956-ffa450edef68
2018-01-26 15:00:28 +00:00
7ed2bd2e8b Fix another mod_lua compile error.
Compilation now tested against Lus 5.1, 5.2
and 5.3. The libs were compiled with COMPAT
flags set, but mod_lua no longer sets them
so it should compile and run with non-COMPAT
libs as well.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1800833 13f79535-47bb-0310-9956-ffa450edef68
2017-07-04 22:14:13 +00:00
fe1923bb91 Fix new compilation breakage in mod_lua.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1800830 13f79535-47bb-0310-9956-ffa450edef68
2017-07-04 21:48:41 +00:00
4b3557a8e9 Mostly revert the configure compat check for
lua from r1785753. This should now no longer
be needed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1800819 13f79535-47bb-0310-9956-ffa450edef68
2017-07-04 20:49:53 +00:00
3490bd62b6 Fix last compat issue with Lua 5.2 and 5.3.
Patch taken from PR58188 which picked it from
openSUSE.

Still needs testing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1800817 13f79535-47bb-0310-9956-ffa450edef68
2017-07-04 20:48:43 +00:00
d98ec3b059 More mod_lua compat for Lua 5.1, 5.2, 5.3.
One last use of luaL_register() with a non-NULL
"name" argument remaining.

Not tested yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1800815 13f79535-47bb-0310-9956-ffa450edef68
2017-07-04 20:35:06 +00:00
d1105fd4f2 mod_lua: Improve compatibility with Lua 5.1, 5.2 and 5.3.
PR58188, PR60831, PR61245.

Still to solve: replace uses of luaL_register().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1800809 13f79535-47bb-0310-9956-ffa450edef68
2017-07-04 19:22:23 +00:00
00949c61e3 configure: check for luaL_register in liblua
This is a temporary workaround for a missing compatibility API on
Debian-like systems (and anyone else who doesn't compile with
LUA_COMPAT_MODULE). Ignore any such libraries so we don't fail
confusingly later.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1785753 13f79535-47bb-0310-9956-ffa450edef68
2017-03-06 19:49:23 +00:00
4a720ae368 configure: remove mod_lua code duplication
Pull identical code into the CHECK_LUA_PATH macro.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1785752 13f79535-47bb-0310-9956-ffa450edef68
2017-03-06 19:49:21 +00:00
52112325c0 Look for specific versioned installs of Lua 5.3
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1785115 13f79535-47bb-0310-9956-ffa450edef68
2017-03-02 12:26:26 +00:00
e6459db019 Save a few bytes in the request pool.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783057 13f79535-47bb-0310-9956-ffa450edef68
2017-02-15 03:52:57 +00:00
cc97ce3e52 https://bz.apache.org/bugzilla/show_bug.cgi?id=58855
Optimize check for empty strings


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1778067 13f79535-47bb-0310-9956-ffa450edef68
2017-01-09 22:08:01 +00:00
4b509440bc Unlock mutex in error path.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1776006 13f79535-47bb-0310-9956-ffa450edef68
2016-12-25 11:11:30 +00:00
e149a8d8d0 Fix some style issue.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1772490 13f79535-47bb-0310-9956-ffa450edef68
2016-12-03 21:59:55 +00:00
cd677cee0c The default value of 'inherit' should be AP_LUA_INHERIT_UNSET.
With this value, the behavior is the same as 'parent-first' in the 'LuaInherit' directive

If not explicitelly initialized, its value is 0 because of the 'apr_calloc 'in 'create_dir_config'. 0 means 'AP_LUA_INHERIT_NONE'

PR 60419

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1772489 13f79535-47bb-0310-9956-ffa450edef68
2016-12-03 21:37:52 +00:00
d79b514c4b Fix spelling in comments and text files.
No functional change.
PR 59990


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756038 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 19:50:02 +00:00
bf5205907b * modules/lua/mod_lua.c (lua_post_config): Use anonymous shm segment
in preference to named segment.  Ensure startup is possible after an
  unclean shutdown.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1738229 13f79535-47bb-0310-9956-ffa450edef68
2016-04-08 11:02:14 +00:00
f439615d29 Fix typo in comment (s/patterm/pattern/).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726086 13f79535-47bb-0310-9956-ffa450edef68
2016-01-21 20:13:58 +00:00
0eddea67ac Added some more log numbers to log statements that
had none.

Those were not detected by the coccinelle script.
Only a few hard cases are remaining now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725548 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 15:43:17 +00:00
af14d158a3 Added many log numbers to log statements that
had none.

Those were not detected by the coccinelle script.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725485 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 12:02:41 +00:00
44ce30494e Added many log numbers to log statements that
had none.

Handled all files in modules/.

I used the coccinelle script provided by Stefan.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725392 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 00:03:18 +00:00
cfabdeb78e Turn 5.1/5.2 order upside down, simplify. This should also (AFAIK) work with Ubuntu/Debian, which has previously been known to fail to compile mod_lua.so
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1706533 13f79535-47bb-0310-9956-ffa450edef68
2015-10-03 09:45:20 +00:00
68131d85a4 Fix some style issues on files that can easily be synch'ed with 2.4.x
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705983 13f79535-47bb-0310-9956-ffa450edef68
2015-09-30 08:35:35 +00:00
0116b86611 accept both 5.1 and 5.2, so make messages clear
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1703642 13f79535-47bb-0310-9956-ffa450edef68
2015-09-17 15:01:38 +00:00
ca5279532e Add in finding LUA installed via Macports and others
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1703417 13f79535-47bb-0310-9956-ffa450edef68
2015-09-16 14:42:35 +00:00
e8ea4c9a72 just a note
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1698339 13f79535-47bb-0310-9956-ffa450edef68
2015-08-28 14:39:53 +00:00
e76410a124 we have this nwo, don't we?
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1698338 13f79535-47bb-0310-9956-ffa450edef68
2015-08-28 14:31:22 +00:00