Daniel Gruno
89d818870d
If r:regex does not match, only return 'false', don't try to create error messages, because there should not be any - it's either match or no match here at this point.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1434065 13f79535-47bb-0310-9956-ffa450edef68
2013-01-16 18:00:04 +00:00
Daniel Gruno
49fcd96e73
Using the traditional way of declaring Lua functions does not seem to work with NetWare (and possibly Windows too?)
...
Thus, at least until we find a smarter way, we have to move the r:* functions into lua_request.c and connect them from there.
The only functional change is that the transferred functions are now called through the request object instead of the apache2 package.
The distinction between what merited it to be in either structure seems very vague, so for now, we'll keep the HTTP return codes in the apache2 table, and the request/server functions in the request object.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1433967 13f79535-47bb-0310-9956-ffa450edef68
2013-01-16 14:52:52 +00:00
Daniel Gruno
234523fdca
The pool and db object to be used should be created before trying to acquire a driver handle.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1432892 13f79535-47bb-0310-9956-ffa450edef68
2013-01-14 12:04:38 +00:00
Daniel Gruno
05bcfb46bb
revert r1432881 - t'wasn't a bug after all.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1432886 13f79535-47bb-0310-9956-ffa450edef68
2013-01-14 11:42:28 +00:00
Daniel Gruno
3c72b3caf0
mod_lua/dbd: Only 2 arguments are passed, so let's tell Lua to only return 2, not 3.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1432881 13f79535-47bb-0310-9956-ffa450edef68
2013-01-14 11:37:09 +00:00
Daniel Gruno
4a2c2abb46
Shamelessly add some people to the contributors list (I hope they're okay with that)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1432422 13f79535-47bb-0310-9956-ffa450edef68
2013-01-12 13:25:40 +00:00
Daniel Gruno
4bf09168ad
This stuff is now in trunk.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1432421 13f79535-47bb-0310-9956-ffa450edef68
2013-01-12 13:24:15 +00:00
Daniel Gruno
ba7f623fe7
Debian doesn't like pushing statically defined functions into tables, so we'll declare them in lua_dbd.h and just make them regular functions instead.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1432418 13f79535-47bb-0310-9956-ffa450edef68
2013-01-12 12:58:31 +00:00
Daniel Gruno
60e2bf1f47
Since functions are now pushed solely in lua_dbd.c, there's no need to declare them in lua_dbd.h
...
Hopefully, this solves the Windows compiler issues.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1431930 13f79535-47bb-0310-9956-ffa450edef68
2013-01-11 08:13:28 +00:00
Gregg Lewis Smith
f6551d49f0
inform compiler where mod_dbd.h is located
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1431681 13f79535-47bb-0310-9956-ffa450edef68
2013-01-10 21:53:50 +00:00
Guenter Knauf
cff3f7fec1
Added include path for mod_dbd.h.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1431322 13f79535-47bb-0310-9956-ffa450edef68
2013-01-10 12:41:13 +00:00
Daniel Gruno
e582addb58
CodeWarrior workaround for lua_dbd
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1431236 13f79535-47bb-0310-9956-ffa450edef68
2013-01-10 09:47:30 +00:00
Daniel Gruno
27fc69424c
Fix typo in comment, as per bugzilla #54388
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1430265 13f79535-47bb-0310-9956-ffa450edef68
2013-01-08 13:05:53 +00:00
Daniel Gruno
0e04ce5529
Add database features for mod_lua (apr_dbd + mod_dbd).
...
See documentation update for API and examples.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1430225 13f79535-47bb-0310-9956-ffa450edef68
2013-01-08 11:42:50 +00:00
Stefan Fritsch
7deeb8782a
fix typo: || not |
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1429169 13f79535-47bb-0310-9956-ffa450edef68
2013-01-04 23:48:15 +00:00
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