Dispatcher: FCGI Finish -> 10ms schneller im Browser
authorSven Schöling <s.schoeling@linet-services.de>
Thu, 9 Jul 2015 13:46:13 +0000 (15:46 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 20 Jul 2015 14:37:26 +0000 (16:37 +0200)
SL/Dispatcher.pm

index 17aaab0..e8725b5 100644 (file)
@@ -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;
@@ -329,8 +337,6 @@ sub handle_request {
   $::request  = undef;
   Form::disconnect_standard_dbh;
 
-  $::lxdebug->end_request;
-
   $self->_watch_for_changed_files;
 
   $::lxdebug->leave_sub;