• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/zip/nginx/archive.php
  • Класс: BitrixLandingZipNginxArchive
  • Вызов: Archive::addHeaders
protected function addHeaders()
{
	$httpResponse = Context::getCurrent()->getResponse();
	$httpResponse->addHeader('X-Archive-Files', 'zip');

	$utfName = CHTTP::urnEncode($this->name, 'UTF-8');
	$translitName = CUtil::translit($this->name, LANGUAGE_ID, [
		'max_len' => 1024,
		'safe_chars' => '.',
		'replace_space' => '-',
	]);
	$httpResponse->addHeader(
		'Content-Disposition',
		"attachment; filename="" . $translitName . ""; filename*=utf-8''" . $utfName
	);

	unset($utfName, $translitName, $httpResponse);
}