Files
apache-http-server/modules/lua/README
Rainer Jung 9552c8947c mod_lua: Improve compatibility with Lua 5.1, 5.2 and 5.3.
PR58188, PR60831, PR61245.

CTR

The following lua 5.2 and 5.3 compat change
should be checked for runtime correctness
by someone more knowledgeable about lua.

Index: modules/lua/lua_apr.c
--- modules/lua/lua_apr.c (original)
+++ modules/lua/lua_apr.c Tue Jul  4 20:48:43 2017
@@ -82,7 +82,11 @@ static const luaL_Reg lua_table_methods[
 int ap_lua_init(lua_State *L, apr_pool_t *p)
 {
     luaL_newmetatable(L, "Apr.Table");
+#if LUA_VERSION_NUM < 502
     luaL_register(L, "apr_table", lua_table_methods);
+#else
+    luaL_newlib(L, lua_table_methods);
+#endif
     lua_pushstring(L, "__index");
     lua_pushstring(L, "get");
     lua_gettable(L, 2);


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1800835 13f79535-47bb-0310-9956-ffa450edef68
2017-07-04 22:28:38 +00:00

55 lines
1.7 KiB
Org Mode

-*- mode:org -*-
* Requirements:
** lua 5.1, 5.2, 5.3 ( http://www.lua.org/ ) or LuaJIT 2.x ( http://www.luajit.org/ )
** Apache HTTPD 2.4 ( http://httpd.apache.org/ ) or higher
* Documentation
See docs/README
* Building
For now, see docs/building-from-subversion.txt
* Task List
** TODO Use r->file to determine file, doing rewriting in translate_name
** TODO Provide means to get useful output from lua errors in response body
Probably have to put it on the vm spec for pre-handler errors, as
it is pre-handler, will prolly be on the request_config somewhere,
but sometimes cannot put there, so... fun
** TODO Mapping in the server_rec
** TODO Figure out how reentrancy works regarding filter chain stuff.
Do we need new "threads"?
** TODO: Flatten LuaHook* to LuaHook phase file fn ?
** TODO: document or remove block sections
** TODO: test per-dir behavior of block sections
** TODO: Suppress internal details (fs path to scripts, etc) in error responses
** TODO: Check whether we can tighten the mode flag in lua_load(),
luaL_loadfile() an dluaL_loadbuffer() from NULL (="bt")
to e.g. "t".
* License
Apache License, Version 2.0,
http://www.apache.org/licenses/LICENSE-2.0
See NOTICE file for more information
* Problems and Patches:
Please use dev@httpd.apache.org for discussing mod_lua development
To subscribe send email to dev-subscribe@httpd.apache.org
Note that this is for development discussion, not user support :-)
* Contributors Include
** Brian McCallister
** Paul Querna
** Garrett Rooney
** Martin Traverso
** Brian Akins
** Justin Erenkrantz
** Philip M. Gollucci
** Stefan Fritsch
** Eric Covener
** Daniel Gruno
** Günter Knauf
** Jim Jagielski