diff options
author | Daniel Gruno <humbedooh@apache.org> | 2013-01-16 19:00:04 +0100 |
---|---|---|
committer | Daniel Gruno <humbedooh@apache.org> | 2013-01-16 19:00:04 +0100 |
commit | 89d818870d41a1168ab5838bd811af66daeb447f (patch) | |
tree | 9066ce05fc373b7c9baa2fd2fc3ed226774ecff6 /modules | |
parent | * A limit of zero means unlimited for LimitRequestBody. (diff) | |
download | apache2-89d818870d41a1168ab5838bd811af66daeb447f.tar.xz apache2-89d818870d41a1168ab5838bd811af66daeb447f.zip |
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
Diffstat (limited to 'modules')
-rw-r--r-- | modules/lua/lua_request.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index 7020c2d1d9..c1267f3cbd 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -920,13 +920,11 @@ static int lua_ap_regex(lua_State *L) } rv = ap_regexec(®ex, source, AP_MAX_REG_MATCH, matches, 0); - if (rv < 0) { + if (rv == AP_REG_NOMATCH) { lua_pushboolean(L, 0); - err = apr_palloc(r->pool, 256); - ap_regerror(rv, ®ex, err, 256); - lua_pushstring(L, err); - return 2; + return 1; } + lua_newtable(L); for (i = 0; i < regex.re_nsub; i++) { lua_pushinteger(L, i); |