src/Tools/WWW_Find/echo.ML
author wenzelm
Fri, 20 Nov 2009 16:08:14 +0100
changeset 33823 24090eae50b6
parent 33817 f6a4da31f2f1
permissions -rw-r--r--
standardized headers;

(*  Title:      Tools/WWW_Find/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;