src/Tools/WWW_Find/echo.ML
changeset 33817 f6a4da31f2f1
child 33823 24090eae50b6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Tools/WWW_Find/echo.ML	Fri Nov 20 18:36:44 2009 +1100
@@ -0,0 +1,16 @@
+(*  Title:      echo.ML
+    Author:     Timothy Bourke, NICTA
+
+    Install simple echo server.
+*)
+
+local
+fun echo (req, content, send) =
+  (send (ScgiReq.show req);
+   send "--payload-----\n";
+   send (Byte.bytesToString content);
+   send "\n--------------\n")
+in
+val () = ScgiServer.register ("echo", SOME Mime.plain, echo);
+end;
+