Skip to content

Commit

Permalink
(fixes #2776, BP from #1977) use sfWebResponse::sendHttpHeaders() ins…
Browse files Browse the repository at this point in the history
…tead of header() and undo remove response body

(cherry picked from commit 6a717db)
  • Loading branch information
martini2002jp committed Feb 6, 2012
1 parent ec98cc4 commit 1600308
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/filter/opAPISecurityFilter.class.php
Expand Up @@ -43,11 +43,9 @@ protected function sendError($statusCode)
$response = $this->getContext()->getResponse(); $response = $this->getContext()->getResponse();
$response->setStatusCode($statusCode); $response->setStatusCode($statusCode);


header('HTTP/1.1 '. $response->getStatusCode().' '.$response->getStatusText()); $response->sendHttpHeaders();
foreach ($response->getHttpHeaders() as $name => $value)
{ echo $response->getStatusCode().' '.$response->getStatusText();
header($name.': '.$value);
}


throw new sfStopException(); throw new sfStopException();
} }
Expand Down

0 comments on commit 1600308

Please sign in to comment.