You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by hu...@apache.org on 2014/03/18 18:02:47 UTC

svn commit: r1578964 - in /httpd/httpd/branches/2.4.x: CHANGES modules/lua/lua_vmprep.c

Author: humbedooh
Date: Tue Mar 18 17:02:47 2014
New Revision: 1578964

URL: http://svn.apache.org/r1578964
Log:
mod_lua: backport r1578870+r1578882 and add to change log.

Modified:
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/modules/lua/lua_vmprep.c

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1578964&r1=1578963&r2=1578964&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Tue Mar 18 17:02:47 2014
@@ -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
 

Modified: httpd/httpd/branches/2.4.x/modules/lua/lua_vmprep.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/lua/lua_vmprep.c?rev=1578964&r1=1578963&r2=1578964&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/lua/lua_vmprep.c (original)
+++ httpd/httpd/branches/2.4.x/modules/lua/lua_vmprep.c Tue Mar 18 17:02:47 2014
@@ -354,7 +354,12 @@ static apr_status_t vm_construct(lua_Sta
                                            : 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