]> matita.cs.unibo.it Git - helm.git/blobdiff - matitaB/matita/matitadaemon.ml
Changed redirect behaviour of the daemon (incompatibility with browsers
[helm.git] / matitaB / matita / matitadaemon.ml
index c21bed2e7c25129d7130633062123f02dc1b8e22..5abb8ad07e8f90dd03f0e718556b0127d8aa72e5 100644 (file)
@@ -268,7 +268,10 @@ let register (cgi : Netcgi1_compat.Netcgi_types.cgi_activation) =
   let userpw = cgi#argument_value "password" in
   (try 
     MatitaAuthentication.add_user uid userpw;
-    env#set_output_header_field "Location" "/index.html"
+(*    env#set_output_header_field "Location" "/index.html" *)
+    cgi#outchannel#output_string
+     ("<html><head><meta http-equiv=\"refresh\" content=\"2;url=/login.html\">"
+     ^ "</head><body>Redirecting to login page...</body></html>")
    with
    | MatitaAuthentication.UsernameCollision _ ->
       cgi#set_header
@@ -305,7 +308,10 @@ let login (cgi : Netcgi1_compat.Netcgi_types.cgi_activation) =
        cgi#set_header ~set_cookies:[cookie] (); *)
     env#set_output_header_field 
       "Set-Cookie" ("session=" ^ (Uuidm.to_string sid));
-    env#set_output_header_field "Location" "/index.html"
+(*    env#set_output_header_field "Location" "/index.html" *)
+    cgi#outchannel#output_string
+     ("<html><head><meta http-equiv=\"refresh\" content=\"2;url=/index.html\">"
+     ^ "</head><body>Redirecting to Matita page...</body></html>")
    end
   else
    begin