From b93fd4b7d0835fd5b35ad5615f6b8b105a827280 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Mon, 7 Apr 2003 15:21:04 +0000 Subject: [PATCH] added "/list_servers" method (actually used by the getter panel) --- helm/http_getter/http_getter.ml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/helm/http_getter/http_getter.ml b/helm/http_getter/http_getter.ml index d8526afa9..501b9d839 100644 --- a/helm/http_getter/http_getter.ml +++ b/helm/http_getter/http_getter.ml @@ -386,6 +386,15 @@ let callback (req: Http_types.request) outchan = Http_getter_env.reload (); (* reload servers list from servers file *) let log = update_from_all_servers () in return_html_msg log outchan + | "/list_servers" -> + return_html_raw + (sprintf "\n%s\n
" + (String.concat "\n" + (List.map + (let i = ref ~-1 in + fun s -> incr i; sprintf "%d%s" !i s) + !Http_getter_env.servers))) + outchan | "/add_server" -> let name = req#param "url" in (try -- 2.39.2