httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r728568 - /httpd/httpd/trunk/modules/lua/mod_lua.c
Date Mon, 22 Dec 2008 01:05:26 GMT
Author: pquerna
Date: Sun Dec 21 17:05:25 2008
New Revision: 728568

URL: http://svn.apache.org/viewvc?rev=728568&view=rev
Log:
Use the HTTP_INTERNAL_SERVER_ERROR define instead of 500 directly.

Modified:
    httpd/httpd/trunk/modules/lua/mod_lua.c

Modified: httpd/httpd/trunk/modules/lua/mod_lua.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/mod_lua.c?rev=728568&r1=728567&r2=728568&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/mod_lua.c (original)
+++ httpd/httpd/trunk/modules/lua/mod_lua.c Sun Dec 21 17:05:25 2008
@@ -40,7 +40,7 @@
 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 @@
         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 @@
                 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 @@
                                   "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 @@
 
             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)) {



Mime
View raw message