• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/httpresponse.php
  • Класс: BitrixMainHttpResponse
  • Вызов: HttpResponse::flushStatus
protected function flushStatus()
{
	if (($status = $this->headers->getStatus()) > 0)
	{
		$reasonPhrase = $this->headers->getReasonPhrase();
		if ($reasonPhrase != '')
		{
			$status .= ' ' . $reasonPhrase;
		}

		$httpStatus = ConfigConfiguration::getValue('http_status');
		$cgiMode = (stristr(php_sapi_name(), 'cgi') !== false);

		if ($cgiMode && !$httpStatus)
		{
			header('Status: ' . $status);
		}
		else
		{
			header($this->getServerProtocol() . ' ' . $status);
		}
	}
}