]> matita.cs.unibo.it Git - helm.git/commitdiff
use latest Http_getter module API
authorStefano Zacchiroli <zack@upsilon.cc>
Thu, 21 Oct 2004 13:20:11 +0000 (13:20 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Thu, 21 Oct 2004 13:20:11 +0000 (13:20 +0000)
helm/http_getter/main.ml

index 44c69610e1d4e0ffffcef79d3c332988e127ed8f..47784d137ba4ba51d84b43bf747b14fd124177b8 100644 (file)
@@ -194,8 +194,9 @@ let return_resolve uri outchan =
     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
@@ -254,6 +255,9 @@ let callback (req: Http_types.request) outchan =
     | "/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