mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Return a 500 error instead of DECLINED when LuaHook* script does not
return a numeric value. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519398 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,6 +1,9 @@
|
|||||||
-*- coding: utf-8 -*-
|
-*- coding: utf-8 -*-
|
||||||
Changes with Apache 2.5.0
|
Changes with Apache 2.5.0
|
||||||
|
|
||||||
|
*) mod_lua: Return a 500 error if a LuaHook* script doesn't return a
|
||||||
|
numeric return code. [Eric Covener]
|
||||||
|
|
||||||
*) Add experimental cmake-based build system for Windows. [Jeff Trawick,
|
*) Add experimental cmake-based build system for Windows. [Jeff Trawick,
|
||||||
Tom Donovan]
|
Tom Donovan]
|
||||||
|
|
||||||
|
@@ -664,6 +664,11 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap
|
|||||||
ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, "Lua hook %s:%s for phase %s returned %d",
|
ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, "Lua hook %s:%s for phase %s returned %d",
|
||||||
hook_spec->file_name, hook_spec->function_name, name, rc);
|
hook_spec->file_name, hook_spec->function_name, name, rc);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, "Lua hook %s:%s for phase %s did not return a numeric value",
|
||||||
|
hook_spec->file_name, hook_spec->function_name, name);
|
||||||
|
return HTTP_INTERNAL_SERVER_ERROR;
|
||||||
|
}
|
||||||
if (rc != DECLINED) {
|
if (rc != DECLINED) {
|
||||||
ap_lua_release_state(L, spec, r);
|
ap_lua_release_state(L, spec, r);
|
||||||
return rc;
|
return rc;
|
||||||
|
Reference in New Issue
Block a user