Добрый день!

Собственно возникла проблема с 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 mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Ответить