From 5b421885fdfad728ab584ef15ec1873ec3bc2a05 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 29 May 2011 14:29:26 -0400 Subject: getHeader and setHeader --- tests/headers.ur | 11 +++++++++++ tests/headers.urp | 5 +++++ tests/headers.urs | 1 + 3 files changed, 17 insertions(+) create mode 100644 tests/headers.ur create mode 100644 tests/headers.urp create mode 100644 tests/headers.urs (limited to 'tests') diff --git a/tests/headers.ur b/tests/headers.ur new file mode 100644 index 00000000..afb1565f --- /dev/null +++ b/tests/headers.ur @@ -0,0 +1,11 @@ +fun action () = + setHeader (blessResponseHeader "Location") "http://www.google.com/"; + return + +fun main () = + ag <- getHeader (blessRequestHeader "User-Agent"); + return + User agent: {[ag]} + +
+
diff --git a/tests/headers.urp b/tests/headers.urp new file mode 100644 index 00000000..c5fdfc99 --- /dev/null +++ b/tests/headers.urp @@ -0,0 +1,5 @@ +rewrite url Headers/* +allow requestHeader User-Agent +allow responseHeader Location + +headers diff --git a/tests/headers.urs b/tests/headers.urs new file mode 100644 index 00000000..6ac44e0b --- /dev/null +++ b/tests/headers.urs @@ -0,0 +1 @@ +val main : unit -> transaction page -- cgit v1.2.3