diff options
Diffstat (limited to 'debian/perl-framework/t/htdocs/modules/lua/translate.lua')
-rw-r--r-- | debian/perl-framework/t/htdocs/modules/lua/translate.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/perl-framework/t/htdocs/modules/lua/translate.lua b/debian/perl-framework/t/htdocs/modules/lua/translate.lua new file mode 100644 index 0000000..7d19c9a --- /dev/null +++ b/debian/perl-framework/t/htdocs/modules/lua/translate.lua @@ -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 |