src/Tools/WWW_Find/echo.ML
author haftmann
Thu, 17 Jun 2010 15:59:47 +0200
changeset 37449 034ebe92f090
parent 33823 24090eae50b6
permissions -rw-r--r--
more precise code

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