Skip to content

Commit

Permalink
Send the content and close the request within Cubex, instead of depen…
Browse files Browse the repository at this point in the history
…ding on Symfony Response
  • Loading branch information
bajb committed Apr 15, 2020
1 parent 31e8291 commit 78f7716
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Cubex.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,19 @@ public function handle(
{
flush();
}

$this->_eventChannel->trigger(ResponsePreSendContentEvent::i($c, $handler, $r));
$r->send();
$r->sendContent();

//Finish the request
if(\function_exists('fastcgi_finish_request'))
{
fastcgi_finish_request();
}
else if(!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true))
{
Response::closeOutputBuffers(0, true);
}
}
$this->_eventChannel->trigger(HandleCompleteEvent::i($c, $handler, $r));
}
Expand Down

0 comments on commit 78f7716

Please sign in to comment.