x-accel-redirect и content-type text/html

ruNovel nginx-forum at nginx.us
Fri Feb 14 08:31:33 UTC 2014


Добрый день!

Собственно возникла проблема с X-Accel-Redirect. Он постоянно отдает content
type - text/hrml.
Вот скрипт который обрабатывает отдачу файла:
header("Pragma: public");
header("Expires: 0");
header('Content-Description: File Transfer');
header('Content-Length: ' . filesize($realFile));
header('Content-Disposition: attachment; filename=' . $filename . '');
header('Content-Transfer-Encoding: binary');
header('Content-Type: application/pdf', true);
header('X-Accel-Redirect: ' . $aliasedFile);

Конфиг на Nginx 
location /files {
        internal;
        root /var/www/site.com/www;
        gzip off;
        #add_header Content-Type application/pdf; это временный костыль
}

Пока пользуюсь костылем. Что делать?

Posted at Nginx Forum: http://forum.nginx.org/read.php?21,247538,247538#msg-247538



Подробная информация о списке рассылки nginx-ru