Skip to content

Commit

Permalink
set end as default swoole response process
Browse files Browse the repository at this point in the history
  • Loading branch information
IndraGunawan committed May 22, 2018
1 parent c6d5ef7 commit 4ecb153
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Symfony/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ class Response
*
* @param SwooleResponse $swooleResponse
* @param SfResponse $sfResponse
* @param bool $end
*/
public static function writeSwooleResponse(SwooleResponse $swooleResponse, SfResponse $sfResponse)
public static function writeSwooleResponse(SwooleResponse $swooleResponse, SfResponse $sfResponse, $end = true)
{
// write headers
self::writeHeaders($swooleResponse, $sfResponse);

// write content
$swooleResponse->write($sfResponse->getContent());
if (true === $end) {
$swooleResponse->end($sfResponse->getContent());
} else {
$swooleResponse->write($sfResponse->getContent());
}
}

/**
Expand Down

0 comments on commit 4ecb153

Please sign in to comment.