]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/hbugs/common/hbugs_messages.ml
- moved here respond_exc and respond_msg from broker/
[helm.git] / helm / hbugs / common / hbugs_messages.ml
index d0a6fe1dbad25b1d5274f25f335e3b97eb6c561d..0eac0b149aa26a685a4617c79a7321a8c31828d0 100644 (file)
@@ -213,4 +213,8 @@ let string_of_msg = function
 
 let submit_req ~url msg =
   msg_of_string (Hbugs_misc.http_post ~body:(string_of_msg msg) url)
+let return_xml_msg body outchan =
+  Http_daemon.respond ~headers:["Content-Type", "text/xml"] ~body outchan
+let respond_msg msg = return_xml_msg (string_of_msg msg);;
+let respond_exc name value = respond_msg (Exception (name, value));;