From 77994a44a78f2a0a510296bdc2ec8c9cf882b222 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Fri, 10 Jan 2003 09:12:58 +0000 Subject: [PATCH] - fixed typo: use Param_not_found exception from Http_types - enabled logging by default - log IP of incoming connections --- helm/uwobo/src/ocaml/uwobo.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/helm/uwobo/src/ocaml/uwobo.ml b/helm/uwobo/src/ocaml/uwobo.ml index 22714b29a..abe65f47c 100644 --- a/helm/uwobo/src/ocaml/uwobo.ml +++ b/helm/uwobo/src/ocaml/uwobo.ml @@ -34,7 +34,7 @@ open Uwobo_common;; let debug = true;; let debug_level = `Debug;; let debug_print s = if debug then prerr_endline s;; -let http_debug = false;; +let http_debug = true;; Http_common.debug := http_debug;; (* environment settings *) @@ -133,7 +133,7 @@ let callback req outchan = let keys = try Pcre.split ~pat:"," (req#param "keys") - with Http_request.Param_not_found _ -> [] + with Http_types.Param_not_found _ -> [] in (match keys with | [] -> (* no key provided, act on all stylesheets *) @@ -171,6 +171,7 @@ let callback req outchan = ((fun _ -> []), []) (* no parameters, no properties *) in try + syslogger#log `Notice (sprintf "Connection from %s" req#clientAddr); syslogger#log `Debug (sprintf "Received request: %s" req#path); (match req#path with | "/add" -> @@ -247,7 +248,7 @@ let callback req outchan = | invalid_request -> Http_daemon.respond_error ~status:(`Client_error `Bad_request) outchan) with - | Http_request.Param_not_found attr_name -> + | Http_types.Param_not_found attr_name -> bad_request (sprintf "Parameter '%s' is missing" attr_name) outchan | exc -> Http_daemon.respond -- 2.39.2