1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-06 09:01:14 +03:00
Commit Graph

170 Commits

Author SHA1 Message Date
Kaspar Brand
089f0eb0ac Spin off module-specific build options into separate build vars.
[second try, supersedes r1385214]

Add MOD_CFLAGS, MOD_LDFLAGS variables etc. to the build commands,
which are available to modules for customization on a per-subdir
basis (by adding definitions to modules.mk). Reduces the risk
of side-effects when a module needs to add CFLAGS, LDFLAGS etc.
and these would be added to the global settings (ALL_CFLAGS etc.).

Adapt build settings for mod_ssl, mod_socache_dc, mod_deflate,
mod_xml2enc, mod_proxy_html, and mod_lua to use the new MOD_xxx
build variables.

Change PICFLAGS, SHLTCFLAGS and LTCFLAGS into config vars, instead
of AC_SUBSTing them in build/rules.mk.in. For support/ab, introduce
ab_CFLAGS and ab_LDFLAGS, and define explicit make targets where
they appear at the proper position in the build commands.

Consistently use "--with-xxx=PATH" in configure help strings which
are used to specify a path to the installation directory of an
auxiliary package.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1385216 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 06:19:13 +00:00
Kaspar Brand
5eb4537e2a revert r1385214, as I inadvertently left out acinclude.m4.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1385215 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 06:16:35 +00:00
Kaspar Brand
3aaa0378b6 Spin off module-specific build options into separate build vars.
Add MOD_CFLAGS, MOD_LDFLAGS variables etc. to the build commands,
which are available to modules for customization on a per-subdir
basis (by adding definitions to modules.mk). Reduces the risk
of side-effects when a module needs to add CFLAGS, LDFLAGS etc.
and these would be added to the global settings (ALL_CFLAGS etc.).

Adapt build settings for mod_ssl, mod_socache_dc, mod_deflate,
mod_xml2enc, mod_proxy_html, and mod_lua to use the new MOD_xxx
build variables.

Change PICFLAGS, SHLTCFLAGS and LTCFLAGS into config vars, instead
of AC_SUBSTing them in build/rules.mk.in. For support/ab, introduce
ab_CFLAGS and ab_LDFLAGS, and define explicit make targets where
they appear at the proper position in the build commands.

Consistently use "--with-xxx=PATH" in configure help strings which
are used to specify a path to the installation directory of an
auxiliary package.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1385214 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 05:55:02 +00:00
Stefan Fritsch
29e93a99b2 another style fix
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1383037 13f79535-47bb-0310-9956-ffa450edef68
2012-09-10 18:49:03 +00:00
Stefan Fritsch
5eddb6d978 more coding style (no logic change)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1383028 13f79535-47bb-0310-9956-ffa450edef68
2012-09-10 18:37:23 +00:00
Stefan Fritsch
7f15aa7251 coding style
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1383024 13f79535-47bb-0310-9956-ffa450edef68
2012-09-10 18:30:06 +00:00
Stefan Fritsch
77e7551062 Fix warnings about unused variable and (false positive) "'mkey' may be used uninitialized in this function"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1383022 13f79535-47bb-0310-9956-ffa450edef68
2012-09-10 18:25:17 +00:00
Stefan Fritsch
533878b7c7 Replace duplicate log msg numbers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1383013 13f79535-47bb-0310-9956-ffa450edef68
2012-09-10 18:06:48 +00:00
Daniel Gruno
5ee40b970d Trying to tie up some loose ends:
- Return immediately if the return val of ap_pass_brigade != APR_SUCCESS
- Return a bit earlier when dealing with input filters, so as to not build up a huge backlog.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1377685 13f79535-47bb-0310-9956-ffa450edef68
2012-08-27 13:57:43 +00:00
Daniel Gruno
b947d24d85 Fix some style issues, use a more persistent bucket for passing along data (and clean it up the right places), and remove in/out-put filters from the chain if need be.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1377647 13f79535-47bb-0310-9956-ffa450edef68
2012-08-27 11:58:34 +00:00
Daniel Gruno
fd1fbe7908 Removing a misleading comment.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1377601 13f79535-47bb-0310-9956-ffa450edef68
2012-08-27 08:46:29 +00:00
Daniel Gruno
58e7c2a350 Add new directives, LuaInputFilter/LuaOutputFilter for creating content filters using Lua.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1377475 13f79535-47bb-0310-9956-ffa450edef68
2012-08-26 18:39:58 +00:00
Daniel Gruno
99afa83362 Add 'server' to scope_to_string's list of possible suspects, as to avoid an error when LogLevel is trace
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1377457 13f79535-47bb-0310-9956-ffa450edef68
2012-08-26 17:01:21 +00:00
Daniel Gruno
4141f17715 Add the missing state release to the LuaMapHandler handler as well, so we won't end in a potential deadlock when acquiring states for in the server scope.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1374310 13f79535-47bb-0310-9956-ffa450edef68
2012-08-17 15:12:41 +00:00
Daniel Gruno
b7f2990d7b Add a missing release of a Lua state (when server scope is used) when a hook returns DECLINED.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1374295 13f79535-47bb-0310-9956-ffa450edef68
2012-08-17 14:45:33 +00:00
Daniel Gruno
71ca51c1a6 mod_lua: Allow scripts handled by the lua-script handler to set a return
code that will be sent to the client, such as 302, 500 etc. This will
allow scripts to be able to f.x. redirect a user to another page by
returning 302.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1374185 13f79535-47bb-0310-9956-ffa450edef68
2012-08-17 09:41:46 +00:00
Guenter Knauf
7814748ab3 NetWare build tweaks.
Make more use of internal makefile macros;
axed now obsolete include paths.
Submitted by: normw gknw net.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1371177 13f79535-47bb-0310-9956-ffa450edef68
2012-08-09 12:11:09 +00:00
Stefan Fritsch
7393da8892 There is only one global provider name space, therefore allow
LuaAuthzProvider only in global scope.

Remove unnecessary server config field.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1370466 13f79535-47bb-0310-9956-ffa450edef68
2012-08-07 19:38:09 +00:00
Daniel Gruno
d7b20ffb70 mod_lua: Decline to serve a request if the script doesn't exist, instead of throwing an internal server error.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1370377 13f79535-47bb-0310-9956-ffa450edef68
2012-08-07 17:29:26 +00:00
Daniel Gruno
2e9e74fd6c mod_lua: Add r:flush, r:sendfile as well as additional request information in the request_rec structure
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1370158 13f79535-47bb-0310-9956-ffa450edef68
2012-08-07 10:02:27 +00:00
Jeff Trawick
2e5559bb81 fix "lua_vmprep.c:29:6: warning: no previous prototype for ‘ap_lua_init_mutex’ [-Wmissing-prototypes]"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369800 13f79535-47bb-0310-9956-ffa450edef68
2012-08-06 12:05:47 +00:00
Jeff Trawick
93111a7645 fix "lua_vmprep.c:355:17: warning: no previous prototype for ‘copy_vm_spec’ [-Wmissing-prototypes]"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369793 13f79535-47bb-0310-9956-ffa450edef68
2012-08-06 11:48:46 +00:00
Daniel Gruno
25fa9a1809 Reverting r1369758
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369763 13f79535-47bb-0310-9956-ffa450edef68
2012-08-06 09:52:50 +00:00
Daniel Gruno
864e336ee3 use the ap_mutex functions to create the mutex instead of the apr_mutex ones.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369758 13f79535-47bb-0310-9956-ffa450edef68
2012-08-06 09:26:10 +00:00
Daniel Gruno
b598e862d3 Add a server scope for Lua states (in LuaScope), which creates a pool of states with manageable minimum and maximum size.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369656 13f79535-47bb-0310-9956-ffa450edef68
2012-08-05 19:57:44 +00:00
Stefan Fritsch
87bcd2414a Revert r1367504:
mod_lua: The current way of getting the authz provider name doesn't
   seem to work. This approach should fix that.

This is not necessary and breaks with "Require not ..."



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369617 13f79535-47bb-0310-9956-ffa450edef68
2012-08-05 16:51:09 +00:00
Jeff Trawick
ea66bb37ca mod_lua.c:189:13: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1368109 13f79535-47bb-0310-9956-ffa450edef68
2012-08-01 16:41:04 +00:00
Daniel Gruno
238af542a3 mod_lua:
Clean up style
use apr_pstrcat instead of apr_psprintf
fix a bug that was causing bad string interpolations.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1367875 13f79535-47bb-0310-9956-ffa450edef68
2012-08-01 07:28:22 +00:00
Daniel Gruno
5e36abf35a mod_lua: Add the (missing) LuaMapHandler directive to the fold.
This should work as the existing documentation describes.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1367725 13f79535-47bb-0310-9956-ffa450edef68
2012-07-31 19:43:29 +00:00
Daniel Gruno
ce1213a92d mod_lua: The current way of getting the authz provider name doesn't seem to work. This approach should fix that.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1367504 13f79535-47bb-0310-9956-ffa450edef68
2012-07-31 11:47:04 +00:00
Daniel Gruno
664f924857 mod_lua: Remember to set cfg->codecache to AP_LUA_CACHE_UNSET when creating a config
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1367048 13f79535-47bb-0310-9956-ffa450edef68
2012-07-30 09:36:44 +00:00
Daniel Gruno
c67acaa6fc mod_lua: Pass on the request_rec to ap_lua_get_lua_state, so we can use it for allocating memory for the cache info lookup.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1367040 13f79535-47bb-0310-9956-ffa450edef68
2012-07-30 09:06:41 +00:00
Daniel Gruno
c0cc85a065 mod_lua: Fix up LuaCodeCache:
- Check both mtime and size of a file when comparing with cache, in case the file is being written to while read
- If LuaCodeCache is 'never', only reload it if it has been run once or more.
- Never use cache if LuaScope is 'once'.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1367025 13f79535-47bb-0310-9956-ffa450edef68
2012-07-30 08:19:14 +00:00
Daniel Gruno
f9b07d1b34 Add LuaCodeCache directive for controlling in-memory caching.
This might need some tweaking on the hash key generation for the mtime lookups, ideas are welcome.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1366890 13f79535-47bb-0310-9956-ffa450edef68
2012-07-29 19:07:38 +00:00
Daniel Gruno
759dfc8e96 LUA_COMPAT_ALL should be defined _before_ including lua headers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1366621 13f79535-47bb-0310-9956-ffa450edef68
2012-07-28 09:09:07 +00:00
Stefan Fritsch
8c960a8c15 Various code clean up
Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 52893 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1361801 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 21:14:00 +00:00
Rainer Jung
bfbbc819d5 Add missing HTTP status codes taken from
http://www.iana.org/assignments/http-status-codes/http-status-codes.xml 

The new codes are now known and some canned error
strings are provided. The web server does not yet actually
produce them in responses or reacts on getting them
from an origin server when acting as a proxy or gateway.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1361784 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 20:22:03 +00:00
Daniel Gruno
f921f8cbde - Define LUA_COMPAT_ALL so mod_lua will be compatible with Lua 5.2
- Add an optional integer argument for parsebody, specifying the maximum size of POST that will be accepted.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1361298 13f79535-47bb-0310-9956-ffa450edef68
2012-07-13 16:59:07 +00:00
Daniel Gruno
68bbfde6ea Add the missing parsebody function to mod_lua, for parsing POST data.
PR 53064.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1352047 13f79535-47bb-0310-9956-ffa450edef68
2012-06-20 11:20:36 +00:00
Stefan Fritsch
99d37b2e33 Add new directive LuaAuthzProvider to allow implementing an
authorization provider in lua


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351020 13f79535-47bb-0310-9956-ffa450edef68
2012-06-16 22:51:19 +00:00
Stefan Fritsch
2385ef2c2f use macro to make definition of integer fields more compact
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351019 13f79535-47bb-0310-9956-ffa450edef68
2012-06-16 22:47:48 +00:00
Stefan Fritsch
d7ed5d0ed6 factor common code into utility function
also improve logging a bit and adjust some log levels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351018 13f79535-47bb-0310-9956-ffa450edef68
2012-06-16 22:46:30 +00:00
Stefan Fritsch
cbb93c651b change various strings from char * to const char *
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351017 13f79535-47bb-0310-9956-ffa450edef68
2012-06-16 22:45:33 +00:00
Stefan Fritsch
32f5f54c25 mod_lua: Add a few missing request_rec fields. Rename remote_ip to
client_ip to match conn_rec


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351014 13f79535-47bb-0310-9956-ffa450edef68
2012-06-16 22:41:01 +00:00
Stefan Fritsch
eca6d64df0 allow tail call optimization in log methods, remove foo method
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351013 13f79535-47bb-0310-9956-ffa450edef68
2012-06-16 22:39:54 +00:00
Stefan Fritsch
ca02d628a6 Change prototype of vm_construct, to work around gcc bug which
causes a segfault.

PR: 52779
Submitted by: Dick Snippe <Dick Snippe tech omroep nl>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351012 13f79535-47bb-0310-9956-ffa450edef68
2012-06-16 22:38:58 +00:00
André Malo
a11c89f232 fix various property issues
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1309567 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 19:49:25 +00:00
Stefan Fritsch
7b8c246611 Be more verbose when logging syntax errors
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1305586 13f79535-47bb-0310-9956-ffa450edef68
2012-03-26 20:59:11 +00:00
Stefan Fritsch
03a8b1b4c2 Fix some typos
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1300766 13f79535-47bb-0310-9956-ffa450edef68
2012-03-14 22:21:50 +00:00
Rainer Jung
7b167c68d3 Remove luaL_reg macro definition no longer needed
and simplify lua_load compatibility macro.

Note that in order to successfully compile with
Lua 5.2.0 we still need to add LUA_COMPAT_ALL
to CPPFLAGS. Detection in config.m4 is still
missing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1239030 13f79535-47bb-0310-9956-ffa450edef68
2012-02-01 09:51:59 +00:00