]> matita.cs.unibo.it Git - helm.git/commitdiff
CVS repository fix: reversion of some lines (related to libhttp) to a working
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 18 Mar 2003 14:57:43 +0000 (14:57 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 18 Mar 2003 14:57:43 +0000 (14:57 +0000)
version.

helm/searchEngine/searchEngine.ml

index 999d858aaedede548ab5fe18917146590f2ea541..109baa45c225644db9f5e4ac68239ca22ab6b9bc 100644 (file)
@@ -139,11 +139,8 @@ let callback (req: Http_types.request) outchan =
         let page = remove_fragment (req#param "url") in
         match page with
         | page when is_permitted page ->
-            let fname = sprintf "%s/%s" pages_dir (remove_fragment page) in
-            debug_print (sprintf "Returning file: %s" fname);
-            Http_daemon.send_basic_headers ~code:200 outchan;
-            Http_daemon.send_CRLF outchan;
-            Http_daemon.send_file ~name:fname outchan
+            Http_daemon.respond_file
+              ~fname:(sprintf "%s/%s" pages_dir (remove_fragment page)) outchan
         | page -> Http_daemon.respond_forbidden ~url:page outchan)
     | "/searchPattern" ->
         let term_string = req#param "term" in