1
0
Fork 0

Adding debian version 2.4.63-1.

Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
Daniel Baumann 2025-06-22 11:01:27 +02:00
parent 7263481e48
commit f56986e2d9
Signed by: daniel.baumann
GPG key ID: BCC918A2ABD66424
1490 changed files with 80785 additions and 0 deletions

View file

@ -0,0 +1,3 @@
function handle(r)
r.status = 201
end

View file

@ -0,0 +1,16 @@
--[[
Example output filter that escapes all HTML entities in the output
]]--
function output_filter(r)
coroutine.yield("prefix\n")
while bucket do -- For each bucket, do...
if string.len(bucket) > 0 then
local output = "bucket:" .. bucket .. "\n"
coroutine.yield(output) -- Send converted data down the chain
else
coroutine.yield("") -- Send converted data down the chain
end
end
coroutine.yield("suffix\n")
-- No more buckets available.
end

View file

@ -0,0 +1,4 @@
function handle(r)
r.content_type = "text/plain"
r:puts("Hello Lua World!\n")
end

View file

@ -0,0 +1,4 @@
function handle(r)
r.content_type = "text/plain"
r:puts("other lua handler\n")
end

View file

@ -0,0 +1,7 @@
function handle(r)
if r.is_https then
r:puts("yep")
else
r:puts("nope")
end
end

View file

@ -0,0 +1,3 @@
function handle(r)
r:puts(r.method)
end

View file

@ -0,0 +1,10 @@
-- Syntax: setheader.lua?HeaderName=foo&HeaderValue=bar
--
-- This will return a document with 'bar' set in the header 'foo'
function handle(r)
local GET, GETMULTI = r:parseargs()
r.headers_out[GET['HeaderName']] = GET['HeaderValue']
r:puts("Header set")
end

View file

@ -0,0 +1,4 @@
function handle(r)
r.headers_out["X-Header"] = "yes"
r.headers_out["X-Host"] = r.headers_in["Host"]
end

View file

@ -0,0 +1,28 @@
require 'apache2'
function translate_name(r)
r:debug("translate_name: " .. r.uri)
local query = r:parseargs()
if query.translateme then
r:debug("translate_name: translateme was true " .. r.uri)
r.uri = "/modules/lua/hello.lua"
return apache2.DECLINED
end
return apache2.DECLINED
end
function translate_name2(r)
r:debug("translate_name2: " .. r.uri)
local query = r:parseargs()
if (query.ok) then
r:debug("will return OK")
end
if query.translateme then
r.uri = "/modules/lua/hello2.lua"
if query.ok then
r.filename= r.document_root .. r.uri
return apache2.OK
end
end
return apache2.DECLINED
end

View file

@ -0,0 +1,3 @@
function handle(r)
r:puts(apache2.version)
end

View file

@ -0,0 +1,18 @@
function handle(r)
if r:wsupgrade() then -- if we can upgrade:
while true do
local line, isFinal = r:wsread()
local len = string.len(line);
r:debug(string.format("writing line of len %d: %s", len, line))
if len >= 1024 then
r:debug("writing line ending in '" .. string.sub(line, -127, -1) .. "'")
end
r:wswrite(line)
if line == "quit" then
r:wsclose() -- goodbye!
break
end
end
end
end