diff options
Diffstat (limited to 'src/lua/lua_http.c')
-rw-r--r-- | src/lua/lua_http.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c index d1a4434c2..8803df80c 100644 --- a/src/lua/lua_http.c +++ b/src/lua/lua_http.c @@ -355,11 +355,17 @@ lua_http_request (lua_State *L) return 1; } -gint -luaopen_http (lua_State * L) +static gint +lua_load_http (lua_State * L) { - - luaL_register (L, "rspamd_http", httplib_m); + lua_newtable (L); + luaL_register (L, NULL, httplib_m); return 1; } + +void +luaopen_http (lua_State * L) +{ + rspamd_lua_add_preload (L, "rspamd_http", lua_load_http); +} |