Adding debian version 2.4.63-1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
parent
7263481e48
commit
f56986e2d9
1490 changed files with 80785 additions and 0 deletions
3
debian/perl-framework/t/htdocs/modules/lua/201.lua
vendored
Normal file
3
debian/perl-framework/t/htdocs/modules/lua/201.lua
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
function handle(r)
|
||||
r.status = 201
|
||||
end
|
16
debian/perl-framework/t/htdocs/modules/lua/filters.lua
vendored
Normal file
16
debian/perl-framework/t/htdocs/modules/lua/filters.lua
vendored
Normal 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
|
4
debian/perl-framework/t/htdocs/modules/lua/hello.lua
vendored
Normal file
4
debian/perl-framework/t/htdocs/modules/lua/hello.lua
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
function handle(r)
|
||||
r.content_type = "text/plain"
|
||||
r:puts("Hello Lua World!\n")
|
||||
end
|
4
debian/perl-framework/t/htdocs/modules/lua/hello2.lua
vendored
Normal file
4
debian/perl-framework/t/htdocs/modules/lua/hello2.lua
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
function handle(r)
|
||||
r.content_type = "text/plain"
|
||||
r:puts("other lua handler\n")
|
||||
end
|
7
debian/perl-framework/t/htdocs/modules/lua/https.lua
vendored
Normal file
7
debian/perl-framework/t/htdocs/modules/lua/https.lua
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
function handle(r)
|
||||
if r.is_https then
|
||||
r:puts("yep")
|
||||
else
|
||||
r:puts("nope")
|
||||
end
|
||||
end
|
3
debian/perl-framework/t/htdocs/modules/lua/method.lua
vendored
Normal file
3
debian/perl-framework/t/htdocs/modules/lua/method.lua
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
function handle(r)
|
||||
r:puts(r.method)
|
||||
end
|
10
debian/perl-framework/t/htdocs/modules/lua/setheaderfromparam.lua
vendored
Normal file
10
debian/perl-framework/t/htdocs/modules/lua/setheaderfromparam.lua
vendored
Normal 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
|
4
debian/perl-framework/t/htdocs/modules/lua/setheaders.lua
vendored
Normal file
4
debian/perl-framework/t/htdocs/modules/lua/setheaders.lua
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
function handle(r)
|
||||
r.headers_out["X-Header"] = "yes"
|
||||
r.headers_out["X-Host"] = r.headers_in["Host"]
|
||||
end
|
28
debian/perl-framework/t/htdocs/modules/lua/translate.lua
vendored
Normal file
28
debian/perl-framework/t/htdocs/modules/lua/translate.lua
vendored
Normal 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
|
3
debian/perl-framework/t/htdocs/modules/lua/version.lua
vendored
Normal file
3
debian/perl-framework/t/htdocs/modules/lua/version.lua
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
function handle(r)
|
||||
r:puts(apache2.version)
|
||||
end
|
18
debian/perl-framework/t/htdocs/modules/lua/websockets.lua
vendored
Normal file
18
debian/perl-framework/t/htdocs/modules/lua/websockets.lua
vendored
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue