httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1519398 - in /httpd/httpd/trunk: CHANGES modules/lua/mod_lua.c
Date Mon, 02 Sep 2013 11:43:54 GMT
Author: covener
Date: Mon Sep  2 11:43:53 2013
New Revision: 1519398

URL: http://svn.apache.org/r1519398
Log:
Return a 500 error instead of DECLINED when LuaHook* script does not 
return a numeric value.


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

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1519398&r1=1519397&r2=1519398&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Sep  2 11:43:53 2013
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 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,
      Tom Donovan]
 

Modified: httpd/httpd/trunk/modules/lua/mod_lua.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/mod_lua.c?rev=1519398&r1=1519397&r2=1519398&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/mod_lua.c (original)
+++ httpd/httpd/trunk/modules/lua/mod_lua.c Mon Sep  2 11:43:53 2013
@@ -664,6 +664,11 @@ static int lua_request_rec_hook_harness(
                 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);
             }
+            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) {
                 ap_lua_release_state(L, spec, r);
                 return rc;



Mime
View raw message