From 1600308947f6b21ce4fdd1a2f514c106ed97cbf7 Mon Sep 17 00:00:00 2001 From: Maki Takahashi Date: Mon, 6 Feb 2012 20:20:49 +0900 Subject: [PATCH] (fixes #2776, BP from #1977) use sfWebResponse::sendHttpHeaders() instead of header() and undo remove response body (cherry picked from commit 6a717dbea7857a13095033077f68f6416d180ec3) --- lib/filter/opAPISecurityFilter.class.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/filter/opAPISecurityFilter.class.php b/lib/filter/opAPISecurityFilter.class.php index a39fd1a4f..9fa0daf1e 100644 --- a/lib/filter/opAPISecurityFilter.class.php +++ b/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(); }