summaryrefslogtreecommitdiffstats
path: root/debian/perl-framework/t/htdocs/modules/lua/setheaderfromparam.lua
diff options
context:
space:
mode:
Diffstat (limited to 'debian/perl-framework/t/htdocs/modules/lua/setheaderfromparam.lua')
-rw-r--r--debian/perl-framework/t/htdocs/modules/lua/setheaderfromparam.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/debian/perl-framework/t/htdocs/modules/lua/setheaderfromparam.lua b/debian/perl-framework/t/htdocs/modules/lua/setheaderfromparam.lua
new file mode 100644
index 0000000..6c8d9c5
--- /dev/null
+++ b/debian/perl-framework/t/htdocs/modules/lua/setheaderfromparam.lua
@@ -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