X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDispatcher.pm;h=38973216d0022e436605995da46336250a6d2900;hb=a8ab093107924691935126205db483112aa7f50e;hp=56791edd0f59b9f8a0ba37541acfc0020a86cf1d;hpb=63b5c301058ad46c5a35d0156935c3ac85aa914e;p=kivitendo-erp.git diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 56791edd0..38973216d 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. @@ -105,8 +105,6 @@ sub pre_request_initialization { die "cannot find locale for user " . $params{login} unless $::locale = Locale->new($::myconfig{countrycode}); $::form->{login} = $params{login}; # normaly implicit at login - - $::instance_conf->init; } } @@ -159,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 { @@ -320,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(routing_type => $routing_type, script_name => $script_name, action => $action); + # cleanup $::auth->save_session; $::auth->expire_sessions; @@ -329,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;