Permalink
Browse files

(fixes #2776, BP from #1977) use sfWebResponse::sendHttpHeaders() ins…

…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 1600308947f6b21ce4fdd1a2f514c106ed97cbf7
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/filter/opAPISecurityFilter.class.php
@@ -43,11 +43,9 @@ protected function sendError($statusCode)
$response = $this->getContext()->getResponse();
$response->setStatusCode($statusCode);
- header('HTTP/1.1 '. $response->getStatusCode().' '.$response->getStatusText());
- foreach ($response->getHttpHeaders() as $name => $value)
- {
- header($name.': '.$value);
- }
+ $response->sendHttpHeaders();
+
+ echo $response->getStatusCode().' '.$response->getStatusText();
throw new sfStopException();
}

0 comments on commit 1600308

Please sign in to comment.