return_xml_raw
(sprintf "<url value=\"%s\" />\n" (Http_getter.resolve uri))
outchan
- with Unresolvable_URI uri ->
- return_xml_raw "<unresolved />\n" outchan
+ with
+ | Unresolvable_URI _ -> return_xml_raw "<unresolvable />\n" outchan
+ | Key_not_found _ -> return_xml_raw "<not_found />\n" outchan
let return_list_servers outchan =
return_html_raw
| "/register" ->
Http_getter.register ~uri:(req#param "uri") ~url:(req#param "url");
return_html_msg "Register done" outchan
+ | "/unregister" ->
+ Http_getter.unregister (req#param "uri");
+ return_html_msg "Unregister done" outchan
| "/clean_cache" ->
Http_getter.clean_cache ();
return_html_msg "Done." outchan