diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/headers.ur | 11 | ||||
-rw-r--r-- | tests/headers.urp | 5 | ||||
-rw-r--r-- | tests/headers.urs | 1 |
3 files changed, 17 insertions, 0 deletions
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 <xml/> + +fun main () = + ag <- getHeader (blessRequestHeader "User-Agent"); + return <xml><body> + User agent: {[ag]} + + <form> <submit action={action}/> </form> + </body></xml> 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 |