protected function sendResponse($status, $body = '') { header('HTTP/1.1 ' . $status); if ($status == 401) { header('WWW-Authenticate: Basic realm="OpenEyes"'); } echo $body; Yii::app()->end(); }