1
0
mirror of https://github.com/apache/httpd.git synced 2025-09-13 22:01:52 +03:00

399 Commits

Author SHA1 Message Date
Joe Orton
ffeacdcc52 Fix typo in code comments; dependancies -> dependencies
Submitted by: John Bampton <jbampton gmail.com>
Github: closes #520


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924446 13f79535-47bb-0310-9956-ffa450edef68
2025-03-18 09:54:15 +00:00
Joe Orton
826f90e639 mod_lua: Fix memory handling in output filters.
* modules/lua/mod_lua.c (lua_output_filter_handle): Fix brigade
  iteration to use constant memory.

Submitted by: G.Grandes <guillermo.grandes gmail.com>
PR: 69590
Github: closes #517


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924095 13f79535-47bb-0310-9956-ffa450edef68
2025-02-28 08:24:10 +00:00
Joe Orton
61db0638bf mod_lua: Make r.ap_auth_type writable
This completes the option of setting the remote user by the authentication
mechanism which actually verified the user.

One possible usecase is that a proxied (upstream) server performs the
authentication, but the access log of HTTPd does not contain this information.
The upstream server can pass this kind of information back to HTTPd and both
servers will have consistent access logs.

Submitted by: Michael Osipov <michaelo apache.org>
PR: 62497
Github: closes #67


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921260 13f79535-47bb-0310-9956-ffa450edef68
2024-10-11 16:20:44 +00:00
Yann Ylavic
67c65983d5 mpm_event,mod_http2,mod_status: Follow up to r1918257: CONN_STATE_ASYNC_WAITIO.
Per discussion on PR #449, have a separate state for returning the connection
to the MPM to wait for an IO (namely CONN_STATE_ASYNC_WAITIO), rather than
(ab)using CONN_STATE_PROCESSING.

This removes the need for AGAIN added in r1918257 (for now), and AP_MPMQ_CAN_AGAIN
is renamed to AP_MPMQ_CAN_WAITIO.

This is also the state that mod_status accounts for, so rename ->processing
to ->wait_io in process_score (shows as "wait-io" in mod_status and mod_lua).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918482 13f79535-47bb-0310-9956-ffa450edef68
2024-06-21 09:48:12 +00:00
Yann Ylavic
d821182d76 mpm_event, mod_status: Separate processing and write completion queues.
As a follow up to r1918022 which handled the new CONN_STATE_PROCESS(ing) and
existing CONN_STATE_WRITE_COMPLETION in the same async queue, let's now have
two separates ones which allows more relevant async accounting in mod_status.

Rename CONN_STATE_PROCESS to CONN_STATE_PROCESSING as it's how it will be
called in mod_status.

* include/ap_mmn.h:
  MMN minor bump for process_score->processing counter.

* include/httpd.h:
  Rename CONN_STATE_PROCESS to CONN_STATE_PROCESSING.

* include/scoreboard.h:
  Add process_score->processing field.

* include/httpd.h, modules/http/http_core.c, modules/http2/h2_c1.c,
    server/mpm/event/event.c, server/mpm/motorz/motorz.c,
    server/mpm/simple/simple_io.c:
  Rename CONN_STATE_PROCESS to CONN_STATE_PROCESSING.

* server/mpm/event/event.c:
  Restore write_completion_q to handle connections in CONN_STATE_WRITE_COMPLETION.
  Use processing_q (renamed from process_q) solely for CONN_STATE_PROCESSING.
  Update process_score->processing according to the length of processing_q.
  
* modules/generators/mod_status.c:
  Show the value of process_score->processing in the stats.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918098 13f79535-47bb-0310-9956-ffa450edef68
2024-06-01 15:08:46 +00:00
Joe Orton
df126569e2 Remove unnecessary APLOGNO() use in TRACE-level logging.
Submitted by: Jackie Chang <jackie.qq.chang gmail.com>
PR: 55627


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1913338 13f79535-47bb-0310-9956-ffa450edef68
2023-10-26 07:31:16 +00:00
Joe Orton
3d70de3a2f * modules/lua: Use https: URLs for httpd.a.o in docs. [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908672 13f79535-47bb-0310-9956-ffa450edef68
2023-03-23 15:14:04 +00:00
Joe Orton
63f6b98eb8 mod_wombat => mod_lua
Fix SVN URL

Submitted by: Sebb <sebb@apache.org>
Github: closes #352


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908671 13f79535-47bb-0310-9956-ffa450edef68
2023-03-23 15:11:59 +00:00
Eric Covener
11a3fcbf9e use filters consistently
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901502 13f79535-47bb-0310-9956-ffa450edef68
2022-06-01 12:36:13 +00:00
Eric Covener
0c2910f074 cast first
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901496 13f79535-47bb-0310-9956-ffa450edef68
2022-06-01 12:29:46 +00:00
Ruediger Pluem
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
Yann Ylavic
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
Christophe Jaillet
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
Ruediger Pluem
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
Stefan Eissing
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
Stefan Eissing
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
Stefan Eissing
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
Christophe Jaillet
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
Christophe Jaillet
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
William A. Rowe Jr
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
Ruediger Pluem
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
Giovanni Bechis
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
Joe Orton
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
Yann Ylavic
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
Eric Covener
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
Eric Covener
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
Joe Orton
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
Christophe Jaillet
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
Jim Jagielski
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
Christophe Jaillet
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
Christophe Jaillet
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
Joe Orton
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
Joe Orton
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
Joe Orton
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
Rainer Jung
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
Rainer Jung
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
Rainer Jung
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
Rainer Jung
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
Rainer Jung
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
Rainer Jung
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
Jacob Champion
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
Jacob Champion
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
Jim Jagielski
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
Christophe Jaillet
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
Jim Jagielski
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
Christophe Jaillet
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
Christophe Jaillet
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
Christophe Jaillet
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
Rainer Jung
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
Joe Orton
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