]> matita.cs.unibo.it Git - helm.git/commitdiff
Matitaweb: opening a file resets the status.
authorWilmer Ricciotti <ricciott@cs.unibo.it>
Tue, 3 Jul 2012 12:58:35 +0000 (12:58 +0000)
committerWilmer Ricciotti <ricciott@cs.unibo.it>
Tue, 3 Jul 2012 12:58:35 +0000 (12:58 +0000)
matitaB/matita/matitadaemon.ml

index fd7696173b0d38ad589819802480729b82e7a5dc..261811815d3c1705d41de529c789ac19cb9ad4a9 100644 (file)
@@ -408,7 +408,7 @@ let retrieve (cgi : Netcgi1_compat.Netcgi_types.cgi_activation) =
          Librarian.NoRootFor _ | Librarian.FileNotFound _ -> "",[] in
     include_paths := incpaths;
     if readonly <> "true" then
-       (let status = (MatitaAuthentication.get_status sid)#set_baseuri baseuri in
+       (let status = new MatitaEngine.status (Some uid) baseuri in
         let history = [status] in
         MatitaAuthentication.set_status sid status;
         MatitaAuthentication.set_history sid history);
@@ -418,6 +418,12 @@ let retrieve (cgi : Netcgi1_compat.Netcgi_types.cgi_activation) =
       ();
     cgi#out_channel#output_string body;
   with
+  | Sys_error _ -> 
+    cgi # set_header 
+      ~cache:`No_cache 
+      ~content_type:"text/xml; charset=\"utf-8\""
+      ();
+    cgi#out_channel#output_string "<error />"
   | Not_found _ -> 
     cgi # set_header
       ~status:`Internal_server_error