summaryrefslogtreecommitdiffstats
path: root/modules/lua
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2008-12-22 02:05:25 +0100
committerPaul Querna <pquerna@apache.org>2008-12-22 02:05:25 +0100
commit9ad474c462f244e19e7661d18cd2a5c487dd0858 (patch)
treed8a0e26f859763d0ff4b6d2d29849167b134e96d /modules/lua
parentFix C90 forbids mixed declarations and code. (diff)
downloadapache2-9ad474c462f244e19e7661d18cd2a5c487dd0858.tar.xz
apache2-9ad474c462f244e19e7661d18cd2a5c487dd0858.zip
Use the HTTP_INTERNAL_SERVER_ERROR define instead of 500 directly.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@728568 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/lua')
-rw-r--r--modules/lua/mod_lua.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c
index 1ad8ee52b5..585c98c561 100644
--- a/modules/lua/mod_lua.c
+++ b/modules/lua/mod_lua.c
@@ -40,7 +40,7 @@ APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(apl, AP_LUA, int, lua_request,
static void report_lua_error(lua_State *L, request_rec *r)
{
const char *lua_response;
- r->status = 500;
+ r->status = HTTP_INTERNAL_SERVER_ERROR;
r->content_type = "text/html";
ap_rputs("<b>Error!</b>\n", r);
@@ -140,7 +140,7 @@ static int lua_handler(request_rec *r)
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "got a vm!");
if (!L) {
/* TODO annotate spec with failure reason */
- r->status = 500;
+ r->status = HTTP_INTERNAL_SERVER_ERROR;
ap_rputs("Unable to compile VM, see logs", r);
}
lua_getglobal(L, d->function_name);
@@ -254,7 +254,7 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name)
ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
"lua: Failed to obtain lua interpreter for %s %s",
hook_spec->function_name, hook_spec->file_name);
- return 500;
+ return HTTP_INTERNAL_SERVER_ERROR;
}
if (hook_spec->function_name != NULL) {
@@ -264,7 +264,7 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name)
"lua: Unable to find function %s in %s",
hook_spec->function_name,
hook_spec->file_name);
- return 500;
+ return HTTP_INTERNAL_SERVER_ERROR;
}
apl_run_lua_request(L, r);
@@ -280,7 +280,7 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name)
if (lua_pcall(L, 1, 1, 0)) {
report_lua_error(L, r);
- return 500;
+ return HTTP_INTERNAL_SERVER_ERROR;
}
rc = DECLINED;
if (lua_isnumber(L, -1)) {