Adding fix for #1988

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4385 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-02-01 07:06:40 +00:00
parent dfb4eefaf8
commit 51969dc95a

View file

@ -400,9 +400,6 @@ class Controller extends Object {
session_write_close();
}
if ($url !== null) {
header('Location: ' . Router::url($url, true));
}
if (is_numeric($status) && $status > 0) {
$codes = array(
100 => "Continue",
@ -443,13 +440,15 @@ class Controller extends Object {
501 => "Not Implemented",
502 => "Bad Gateway",
503 => "Service Unavailable",
504 => "Gateway Time-out"
);
504 => "Gateway Time-out");
if (isset($codes[$status])) {
header("HTTP/1.1 {$status} " . $codes[$status]);
header("HTTP/1.1 $status " . $codes[$status]);
}
}
if ($url !== null) {
header('Location: ' . Router::url($url, true));
}
if ($exit) {
exit();
}