/usr/share/lua/5.1/xavante/cgiluahandler.lua is in xavante 2.3.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | -----------------------------------------------------------------------------
-- Xavante CGILua handler
--
-- Authors: Javier Guerra and Andre Carregal
-- Copyright (c) 2004-2007 Kepler Project
--
-- $Id: cgiluahandler.lua,v 1.46 2009/05/20 22:28:42 mascarenhas Exp $
-----------------------------------------------------------------------------
local xavante = require "wsapi.xavante"
local common = require "wsapi.common"
local _M = {}
local bootstrap = [[
function print(...)
remotedostring("print(...)", ...)
end
io.stdout = {
write = function (...)
remotedostring("io.write(...)", ...)
end
}
io.stderr = {
write = function (...)
remotedostring("io.stderr(...)", ...)
end
}
]]
-------------------------------------------------------------------------------
-- Returns the CGILua handler
-------------------------------------------------------------------------------
function _M.makeHandler (diskpath, params)
params = setmetatable(params or {}, { __index = { modname = "wsapi.sapi",
bootstrap = bootstrap } })
local sapi_loader = common.make_isolated_launcher(params)
return xavante.makeHandler(sapi_loader, nil, diskpath)
end
return _M
|