X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Focaml-http%2Fexamples%2Fdump_args.ml;h=ab082112aca95e554a1a67ac4a9442059fa137a5;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=b7cf02a86c97f332b1da0b8064512c6200d3adaa;hpb=0b2ad37310ed22a0e1454190e884ac531d51ad27;p=helm.git diff --git a/helm/DEVEL/ocaml-http/examples/dump_args.ml b/helm/DEVEL/ocaml-http/examples/dump_args.ml index b7cf02a86..ab082112a 100644 --- a/helm/DEVEL/ocaml-http/examples/dump_args.ml +++ b/helm/DEVEL/ocaml-http/examples/dump_args.ml @@ -23,8 +23,6 @@ open Printf open Http_types let callback req outchan = - Http_daemon.send_basic_headers ~code:(`Code 200) outchan; - Http_daemon.send_CRLF outchan; let str = (sprintf "request path = %s\n" req#path) ^ (sprintf "request GET params = %s\n" @@ -36,9 +34,9 @@ let callback req outchan = (sprintf "request ALL params = %s\n" (String.concat ";" (List.map (fun (h,v) -> String.concat "=" [h;v]) req#params))) ^ - (sprintf "request BODY = '%s'\n" req#body) + (sprintf "request BODY = '%s'\n\n" req#body) in - output_string outchan str + Http_daemon.respond ~code:(`Code 200) ~body: str outchan let spec = { Http_daemon.default_spec with