From 66b7f75467ba81224d961beda0ad0e55664c68b6 Mon Sep 17 00:00:00 2001 From: Wilmer Ricciotti Date: Wed, 7 Sep 2011 12:24:46 +0000 Subject: [PATCH] Changed redirect behaviour of the daemon (incompatibility with browsers different from google chrome). --- matitaB/matita/.depend | 17 +++++++++++------ matitaB/matita/Makefile | 5 +++-- matitaB/matita/matitaAuthentication.ml | 3 ++- matitaB/matita/matitadaemon.ml | 10 ++++++++-- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/matitaB/matita/.depend b/matitaB/matita/.depend index 655c76266..0237e9d2a 100644 --- a/matitaB/matita/.depend +++ b/matitaB/matita/.depend @@ -8,20 +8,24 @@ cicMathView.cmx: matitaMisc.cmx matitaGuiTypes.cmi matitaGtkMisc.cmx \ buildTimeConf.cmx applyTransformation.cmx cicMathView.cmi lablGraphviz.cmo: lablGraphviz.cmi lablGraphviz.cmx: lablGraphviz.cmi -matitaAuthentication.cmo: matitaEngine.cmi matitaAuthentication.cmi -matitaAuthentication.cmx: matitaEngine.cmx matitaAuthentication.cmi +matitaAuthentication.cmo: matitaFilesystem.cmi matitaEngine.cmi \ + matitaAuthentication.cmi +matitaAuthentication.cmx: matitaFilesystem.cmx matitaEngine.cmx \ + matitaAuthentication.cmi matitaclean.cmo: matitaMisc.cmi matitaInit.cmi matitaclean.cmi matitaclean.cmx: matitaMisc.cmx matitaInit.cmx matitaclean.cmi matitac.cmo: matitaclean.cmi matitaMisc.cmi matitaInit.cmi matitaEngine.cmi matitac.cmx: matitaclean.cmx matitaMisc.cmx matitaInit.cmx matitaEngine.cmx -matitadaemon.cmo: matitaInit.cmi matitaEngine.cmi matitaAuthentication.cmi \ - applyTransformation.cmi -matitadaemon.cmx: matitaInit.cmx matitaEngine.cmx matitaAuthentication.cmx \ - applyTransformation.cmx +matitadaemon.cmo: matitaInit.cmi matitaFilesystem.cmi matitaEngine.cmi \ + matitaAuthentication.cmi applyTransformation.cmi +matitadaemon.cmx: matitaInit.cmx matitaFilesystem.cmx matitaEngine.cmx \ + matitaAuthentication.cmx applyTransformation.cmx matitaEngine.cmo: applyTransformation.cmi matitaEngine.cmi matitaEngine.cmx: applyTransformation.cmx matitaEngine.cmi matitaExcPp.cmo: matitaEngine.cmi matitaExcPp.cmi matitaExcPp.cmx: matitaEngine.cmx matitaExcPp.cmi +matitaFilesystem.cmo: matitaFilesystem.cmi +matitaFilesystem.cmx: matitaFilesystem.cmi matitaGeneratedGui.cmo: matitaGeneratedGui.cmx: matitaGtkMisc.cmo: matitaTypes.cmi matitaGeneratedGui.cmo buildTimeConf.cmo \ @@ -69,6 +73,7 @@ matitaAuthentication.cmi: matitaEngine.cmi matitaclean.cmi: matitaEngine.cmi: applyTransformation.cmi matitaExcPp.cmi: +matitaFilesystem.cmi: matitaGtkMisc.cmi: matitaGeneratedGui.cmo matitaGui.cmi: matitaGuiTypes.cmi matitaGuiTypes.cmi: matitaGeneratedGui.cmo applyTransformation.cmi diff --git a/matitaB/matita/Makefile b/matitaB/matita/Makefile index ed24d2c61..2c7f989c9 100644 --- a/matitaB/matita/Makefile +++ b/matitaB/matita/Makefile @@ -93,6 +93,7 @@ all: $(PROGRAMS) $(NOINST_PROGRAMS) UTF8DIR := $(shell $(OCAMLFIND) query helm-syntax_extensions) ULEXDIR := $(shell $(OCAMLFIND) query ulex08) + matitaScriptLexer.cmo: SYNTAXOPTIONS = -pp "camlp5o -I $(UTF8DIR) -I $(ULEXDIR) pa_extend.cmo pa_ulex.cma pa_unicode_macro.cma -loc loc" matitaFilesystem.cmi: matitaFilesystem.mli @@ -387,10 +388,10 @@ TAGS: .PHONY: depend -depend: +depend: SYNTAXOPTIONS = -pp "camlp5o -I $(UTF8DIR) -I $(ULEXDIR) pa_extend.cmo pa_ulex.cma pa_unicode_macro.cma -loc loc" $(H)echo " OCAMLDEP" $(H)$(OCAMLDEP) *.ml *.mli > .depend -depend.opt: +depend.opt: SYNTAXOPTIONS = -pp "camlp5o -I $(UTF8DIR) -I $(ULEXDIR) pa_extend.cmo pa_ulex.cma pa_unicode_macro.cma -loc loc" $(H)echo " OCAMLDEP -native" $(H)$(OCAMLDEP) -native *.ml *.mli > .depend.opt diff --git a/matitaB/matita/matitaAuthentication.ml b/matitaB/matita/matitaAuthentication.ml index d51eb2e4f..77aeed15f 100644 --- a/matitaB/matita/matitaAuthentication.ml +++ b/matitaB/matita/matitaAuthentication.ml @@ -109,7 +109,8 @@ let deserialize () = user_tbl := Marshal.from_channel utbl_ch; close_in utbl_ch; with - | Sys_error _ -> user_tbl := []); + | Sys_error _ -> + user_tbl := []; serialize()); (* old_sessions are now invalid *) session_tbl := []; ;; diff --git a/matitaB/matita/matitadaemon.ml b/matitaB/matita/matitadaemon.ml index c21bed2e7..5abb8ad07 100644 --- a/matitaB/matita/matitadaemon.ml +++ b/matitaB/matita/matitadaemon.ml @@ -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 + ("" + ^ "Redirecting to login page...") 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 + ("" + ^ "Redirecting to Matita page...") end else begin -- 2.39.2