summaryrefslogtreecommitdiffstats
path: root/modules/lua/test/htdocs/hooks.lua
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:01:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:01:30 +0000
commit6beeb1b708550be0d4a53b272283e17e5e35fe17 (patch)
tree1ce8673d4aaa948e5554000101f46536a1e4cc29 /modules/lua/test/htdocs/hooks.lua
parentInitial commit. (diff)
downloadapache2-6beeb1b708550be0d4a53b272283e17e5e35fe17.tar.xz
apache2-6beeb1b708550be0d4a53b272283e17e5e35fe17.zip
Adding upstream version 2.4.57.upstream/2.4.57
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'modules/lua/test/htdocs/hooks.lua')
-rw-r--r--modules/lua/test/htdocs/hooks.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/lua/test/htdocs/hooks.lua b/modules/lua/test/htdocs/hooks.lua
new file mode 100644
index 0000000..b8a8248
--- /dev/null
+++ b/modules/lua/test/htdocs/hooks.lua
@@ -0,0 +1,29 @@
+require 'string'
+require 'apache2'
+
+function translate_name(r)
+ if r.uri == "/translate-name" then
+ r.uri = "/find_me.txt"
+ return apache2.DECLINED
+ end
+ return apache2.DECLINED
+end
+
+function translate_name2(r)
+ if r.uri == "/translate-name2" then
+ r.uri = "/find_me.txt"
+ return apache2.DECLINED
+ end
+ return apache2.DECLINED
+end
+
+function fixups_test(r)
+ -- r:err("KABAZ")
+ if r.uri == "/test_fixupstest" then
+ -- r:err("KABIZ")
+ r.status = 201
+ return apache2.OK
+ end
+ -- r:err("ZIBAK")
+ return apache2.DECLINED
+end \ No newline at end of file