]> granicus.if.org Git - apache/commitdiff
mod_lua: backport r1578870+r1578882 and add to change log.
authorDaniel Gruno <humbedooh@apache.org>
Tue, 18 Mar 2014 17:02:47 +0000 (17:02 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Tue, 18 Mar 2014 17:02:47 +0000 (17:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1578964 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/lua/lua_vmprep.c

diff --git a/CHANGES b/CHANGES
index edcaca33f645e230f0e55989050a27e16db64f1f..7a55a82bc28184fb5c9da2e28246937379669ce8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
 
 Changes with Apache 2.4.10
 
+  *) mod_lua: Log an error when the initial parsing of a Lua file fails.
+     [Daniel Gruno, Filipe Daragon <filipe syhunt com>]
 
 Changes with Apache 2.4.9
 
index b0eb01c432791adee7b30bcef825ae07d8d93e40..6c0ae93eb7891e0416e02535346765e0bdc08482 100644 (file)
@@ -354,7 +354,12 @@ static apr_status_t vm_construct(lua_State **vm, void *params, apr_pool_t *lifec
                                            : lua_tostring(L, 0));
             return APR_EBADF;
         }
-        lua_pcall(L, 0, LUA_MULTRET, 0);
+        if ( lua_pcall(L, 0, LUA_MULTRET, 0) == LUA_ERRRUN ) {
+            ap_log_perror(APLOG_MARK, APLOG_ERR, 0, lifecycle_pool, APLOGNO(02613)
+                          "Error loading %s: %s", spec->file,
+                            lua_tostring(L, -1));
+            return APR_EBADF;
+        }
     }
 
 #ifdef AP_ENABLE_LUAJIT