X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Frdfly%2Frdfly.ml;h=b9a79d1397da4941f444b678bc6d62d04322e995;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=d0bddd8ec21e51e7070ee9eaa27aa45d81523514;hpb=b3fdada9a2439c2ce1320350252e330be490b2da;p=helm.git diff --git a/helm/DEVEL/rdfly/rdfly.ml b/helm/DEVEL/rdfly/rdfly.ml index d0bddd8ec..b9a79d139 100644 --- a/helm/DEVEL/rdfly/rdfly.ml +++ b/helm/DEVEL/rdfly/rdfly.ml @@ -131,7 +131,8 @@ let mk_return_fun contype msg outchan = let return_html = mk_return_fun "text/html" let return_xml = mk_return_fun "text/xml" -let return_400 body ch = Http_daemon.respond_error ~code:400 ~body ch +let return_400 body ch = + Http_daemon.respond_error ~code:(`Code 400) ~body ch let return_html_error s = return_html ("" ^ s ^ "") let get_option key = @@ -170,7 +171,9 @@ let callback (req: Http_types.request) ch = | s -> return_html_error ("unsupported kind: " ^ s) ch end ; M.disconnect db - | invalid_request -> Http_daemon.respond_error ~status:(`Client_error `Bad_request) ch) + | invalid_request -> + Http_daemon.respond_error ~code:(`Status (`Client_error `Bad_request)) + ch) with | Http_types.Param_not_found attr_name -> return_400 (Printf.sprintf "Parameter '%s' is missing" attr_name) ch