diff tests/goback.ur @ 1552:c3b5cf5c2f98

Gentle handling of back-button returns to pages with stale message-passing credentials
author Adam Chlipala <adam@chlipala.net>
date Sun, 28 Aug 2011 17:16:54 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/goback.ur	Sun Aug 28 17:16:54 2011 -0400
@@ -0,0 +1,20 @@
+table channels : { Channel : channel {} }
+
+fun get () =
+    ch <- channel;
+    dml (INSERT INTO channels (Channel) VALUES ({[ch]}));
+    return <xml><body onload={recv ch}>
+      Hi.
+    </body></xml>
+
+fun post () =
+    ch <- channel;
+    dml (INSERT INTO channels (Channel) VALUES ({[ch]}));
+    return <xml><body onload={recv ch}>
+      Hi!
+    </body></xml>
+
+fun main () = return <xml><body>
+  <li><a link={get ()}>Get</a></li>
+  <li><form><submit action={post}/></form></li>
+</body></xml>