Merge pull request #706 from Vespakoen/patch-1
(profiler doesn't show up) laravel.done event doesn't get fired for php-fcgi users
This commit is contained in:
commit
64605f2223
|
@ -178,4 +178,18 @@
|
|||
|
|
||||
*/
|
||||
|
||||
Event::fire('laravel.done', array($response));
|
||||
Event::fire('laravel.done', array($response));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Finish the request for PHP-FastCGI
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Stopping the PHP process for PHP-FastCGI users to speed up some
|
||||
| PHP queries. Acceleration is possible when there are actions in the
|
||||
| process of script execution that do not affect server response.
|
||||
| For example, saving the session in memcached can occur after the page
|
||||
| has been formed and passed to a web server.
|
||||
*/
|
||||
|
||||
$response->foundation->finish();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php namespace Laravel;
|
||||
|
||||
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
|
||||
use Symfony\Component\HttpFoundation\Response as FoundationResponse;
|
||||
use Symfony\Component\HttpFoundation\LaravelResponse as FoundationResponse;
|
||||
|
||||
class Response {
|
||||
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<?php namespace Symfony\Component\HttpFoundation;
|
||||
|
||||
/**
|
||||
* Response represents an HTTP response.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class LaravelResponse extends Response
|
||||
{
|
||||
|
||||
/**
|
||||
* Sends HTTP headers and content.
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function send()
|
||||
{
|
||||
$this->sendHeaders();
|
||||
$this->sendContent();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finishes the request for PHP-FastCGI
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
if (function_exists('fastcgi_finish_request')) {
|
||||
fastcgi_finish_request();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue