Skip to content

Commit

Permalink
Merge pull request #1505 from natanfelles/redirect_headers
Browse files Browse the repository at this point in the history
Do not exit until all Response is completed
  • Loading branch information
jim-parry authored Nov 19, 2018
2 parents 27868b2 + e94022f commit 3d3cb5e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions system/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,17 +326,6 @@ protected function handleRequest(RouteCollectionInterface $routes = null, $cache
$this->benchmark->stop('controller');
}

// Handle any redirects
if ($returned instanceof RedirectResponse)
{
if ($returnResponse)
{
return $returned;
}

$this->callExit(EXIT_SUCCESS);
}

// If $returned is a string, then the controller output something,
// probably a view, instead of echoing it directly. Send it along
// so it can be used with the output.
Expand Down
2 changes: 1 addition & 1 deletion system/HTTP/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ public function redirect(string $uri, string $method = 'auto', int $code = null)
}

$this->setStatusCode($code);
$this->sendHeaders();

return $this;
}

Expand Down

0 comments on commit 3d3cb5e

Please sign in to comment.