in scripts/add-banner.lua [94:129]
function handle(r)
local get = r:parseargs()
local err = nil
local HOST = r.hostname
local PROJ, _ = string.gsub ( HOST, '.apache.org', '' )
local PATH = r.path_info
local TEST = false
r.content_type = "text/html"
if not TEST and not get.test and not in_attic(HOST) then
err = "project is not in attic"
.. " PROJ [" .. PROJ .. "]"
.. " HOST [" .. HOST .. "]"
.. " PATH [" .. PATH .. "]"
end
if err ~= nil then
r:puts(err)
else
local text = TEMPL
local subs =
{ ['!PROJ!'] = PROJ
, ['!HOST!'] = HOST
, ['!PATH!'] = PATH
}
for k, v in pairs ( subs ) do text, _ = string.gsub ( text, k, v ) end
r:puts(text)
end
return apache2.OK
end