• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/composite/responder.php
  • Класс: BitrixMainCompositeFileResponse
  • Вызов: FileResponse::getContentType
public function getContentType()
{
	$contents = $this->getContents();
	$head = mb_strpos($contents, "");
	$meta = "#]+)#im";

	if ($head !== false && preg_match($meta, mb_substr($contents, 0, $head), $match))
	{
		return "text/html; charset=".$match[1];
	}

	return false;
}