src/Tools/WWW_Find/echo.ML
author wenzelm
Fri, 16 Mar 2012 20:33:33 +0100
changeset 46967 499d9bbd8de9
parent 33823 24090eae50b6
permissions -rw-r--r--
uniform keyword names within ML/Scala -- produce elisp names via external conversion; discontinued obsolete Keyword.thy_switch;

(*  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;