diff --git a/laravel/laravel.php b/laravel/laravel.php index c3fef2ee..fcdc32c5 100644 --- a/laravel/laravel.php +++ b/laravel/laravel.php @@ -180,6 +180,4 @@ Event::fire('laravel.done', array($response)); -if (function_exists('fastcgi_finish_request')) { - fastcgi_finish_request(); -} \ No newline at end of file +$response->finish(); \ No newline at end of file diff --git a/laravel/response.php b/laravel/response.php index e5472430..539f5649 100644 --- a/laravel/response.php +++ b/laravel/response.php @@ -1,7 +1,7 @@ + * + * @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(); + } + } + +}