Daniel Gruno
3d8bdb7d7c
Style tweaks, remove add_version_component and fix up some sloppy code. Many thanks to sfritsch for the pointers!
...
And a merry christmas everyone :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425450 13f79535-47bb-0310-9956-ffa450edef68
2012-12-23 10:28:16 +00:00
Daniel Gruno
1050577245
Style tweaks, no functional change.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425243 13f79535-47bb-0310-9956-ffa450edef68
2012-12-22 05:25:50 +00:00
Daniel Gruno
c1f9c7546f
- return NULL if apr_reslist_acquire fails, so we don't end up possibly referencing a null-object
...
- initialize cache_info as NULL
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1424939 13f79535-47bb-0310-9956-ffa450edef68
2012-12-21 14:53:55 +00:00
Daniel Gruno
d9e3aa7316
Remove reference to top secret project! You did not see this commit message ;)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1424938 13f79535-47bb-0310-9956-ffa450edef68
2012-12-21 14:49:06 +00:00
Daniel Gruno
8767ad9988
mod_lua: Fix multipart post parsing, so it doesn't include random bytes at the end.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1424723 13f79535-47bb-0310-9956-ffa450edef68
2012-12-20 21:52:03 +00:00
Stefan Fritsch
a70974b4d9
use ap_bin2hex() to simplify md5/sha1 code
...
also fixes some 'array subscript is above array bounds' warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422552 13f79535-47bb-0310-9956-ffa450edef68
2012-12-16 11:51:56 +00:00
Stefan Fritsch
4cd818b34b
remove unused variable
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422548 13f79535-47bb-0310-9956-ffa450edef68
2012-12-16 11:48:19 +00:00
Daniel Gruno
999476f7f7
mod_lua: Fix unitialized variable in lua_ap_send_interim_response.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422531 13f79535-47bb-0310-9956-ffa450edef68
2012-12-16 11:30:54 +00:00
Daniel Gruno
5a3e2e44dc
mod_lua: If a regex fails, return false plus an error message as second return value. Also fix some functions who weren't always returning a value.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422373 13f79535-47bb-0310-9956-ffa450edef68
2012-12-15 22:03:47 +00:00
Daniel Gruno
ff81e58f05
mod_lua: Fix Windows compatibility issues and remove an unused variable. Thanks, Gregg!
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1422072 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 20:44:41 +00:00
Daniel Gruno
b849415518
mod_lua: Oops, there was a stray 'int i' in the middle of lua_ap_regex.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421784 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 10:25:31 +00:00
Daniel Gruno
df178d1e41
mod_lua: Fix signedness/other small bugs as per cjaillet/fuankg's emails - thanks guys :)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421780 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 10:15:37 +00:00
Daniel Gruno
3b6cdb0f92
mod_lua: Add a lot of core httpd/apr functionality to mod_lua
...
(such as regex matching, expr evaluation, changing/fetching server configuration/info - see docs for a complete list).
This also includes a bunch of automatically scraped functions, which may or may not be super useful.
Comments appreciated as always, especially on the more hacky bits.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420377 13f79535-47bb-0310-9956-ffa450edef68
2012-12-11 20:08:24 +00:00
Daniel Gruno
1a50285096
lua_request.c: Add support for parsing multipart form data via r:parsebody. This is a bit RFC-centric, suggestions are most welcome.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420286 13f79535-47bb-0310-9956-ffa450edef68
2012-12-11 17:09:40 +00:00
Daniel Gruno
ef9056a534
lua_vmprep.c: Additional check to see if the resource list was successfully created, so we don't end up trying to fetch a non-existent resource list when we use the 'server' option for the LuaScope directive.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420181 13f79535-47bb-0310-9956-ffa450edef68
2012-12-11 14:11:41 +00:00
Daniel Gruno
c36aeb051d
mod_lua/lua_request.c: Make r:write return the return value of ap_rwrite, so mod_lua can check for success/failure in writing.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1420176 13f79535-47bb-0310-9956-ffa450edef68
2012-12-11 14:06:41 +00:00
Christophe Jaillet
940259c95d
No need to test for NULL before calling apr_pstrdup.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1398025 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 06:54:36 +00:00
Jeff Trawick
710f0e5eb2
configure: Fix processing of --disable-FEATURE for various features.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1397687 13f79535-47bb-0310-9956-ffa450edef68
2012-10-12 18:58:00 +00:00
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