X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDispatcher.pm;h=77074ccd02449be8c7ad3821d4987fb428087ee0;hb=0d34b38184fdd6a6f1dd1bc7ce509c560e326b4e;hp=7ce18a4765c3e41f080eb3cad02520371ab14cc7;hpb=fa7fc7eeb3ca718914affee06c0629a08d571288;p=kivitendo-erp.git diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 7ce18a476..77074ccd0 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -25,7 +25,6 @@ use English qw(-no_match_vars); use File::Basename; use List::MoreUtils qw(all); use List::Util qw(first); -use POSIX; use SL::ArchiveZipFixes; use SL::Auth; use SL::Dispatcher::AuthHandler; @@ -38,6 +37,7 @@ use SL::Form; use SL::Helper::DateTime; use SL::InstanceConfiguration; use SL::Template::Plugin::HTMLFixes; +use SL::User; # Trailing new line is added so that Perl will not add the line # number 'die' was called in. @@ -157,8 +157,8 @@ sub pre_startup_setup { $::lxdebug = LXDebug->new; $::auth = SL::Auth->new; $::form = undef; - %::myconfig = (); $::request = undef; + %::myconfig = User->get_default_myconfig; } $SIG{__WARN__} = sub { @@ -318,6 +318,14 @@ sub handle_request { $::form->footer; + if ($self->_interface_is_fcgi) { + # fcgi? send send reponse on its way before cleanup. + $self->{request}->Flush; + $self->{request}->Finish; + } + + $::lxdebug->end_request; + # cleanup $::auth->save_session; $::auth->expire_sessions; @@ -327,9 +335,9 @@ sub handle_request { $::form = undef; $::myconfig = (); $::request = undef; - Form::disconnect_standard_dbh; - $::lxdebug->end_request; + SL::DBConnect::Cache->reset_all; + Form::disconnect_standard_dbh; $self->_watch_for_changed_files;