Skip to content

Commit

Permalink
don't explicitly set 200 status code; screws up non-status-code-setti…
Browse files Browse the repository at this point in the history
…ng redirects. 💣
  • Loading branch information
ajacksified committed Apr 6, 2012
1 parent 435b6c1 commit 7d40905
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/Templates/Controller.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ public static function Output($renderer, $context = null)
self::$_statusCode = self::$_defaultStatusCodesByVerb[$_SERVER['REQUEST_METHOD']];
}

header('Status: '.self::$_fullStatusHeaders[self::$_statusCode]);
header('HTTP/1.1 '.self::$_fullStatusHeaders[self::$_statusCode]);
header('Content-type: ' . self::getOutputType());

if(self::$_template !== null)
Expand All @@ -168,6 +166,9 @@ public static function Output($renderer, $context = null)
}
else
{
header('HTTP/1.1 '.self::$_fullStatusHeaders[self::$_statusCode]);
header('Status: '.self::$_fullStatusHeaders[self::$_statusCode]);

$file = VIEW_DIR.$context->CurrentUser->Profile->Template.'/'.self::getContentType().'/errors/'.self::$_statusCode.self::getTemplateExt();
}

Expand Down

0 comments on commit 7d40905

Please sign in to comment.