October 08, 2014 04:03AM
Доброго времени суток!
С fastcgi приложения передаю заголовок Content-Length, но nginx его убирает (.
не могу понять почему и зачем.
кусочек debug.log :
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi header: "Content-Length: 15868200;"
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi parser: 0
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi header: "X-Content-Length: 15868200;"
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi parser: 0
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi header: "Content-Type: application/octet-stream;"
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi parser: 0
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi header: "Content-Disposition: attachment; filename='file.mp3';"
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi parser: 1
......
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi header done
2014/10/07 21:35:51 [debug] 2740#0: *11 xslt filter header
2014/10/07 21:35:51 [debug] 2740#0: *11 HTTP/1.1 200 OK
Server: nginx
Date: Tue, 07 Oct 2014 18:35:51 GMT
Content-Type: application/octet-stream;
Connection: close
Accept-Ranges: bytes;
X-Content-Length: 15868200;
Content-Disposition: attachment; filename='file.mp3';

После заголовка X-Content-Length
fastcgi parser: 0
и после Content-Length так же fastcgi parser: 0
но, X-Content-Length попадает в ответ, Content-Length нет .

Конфиг:
server {
server_name localhost 127.0.0.1;
location / {
chunked_transfer_encoding off;
fastcgi_pass_header Content-Length;
fastcgi_pass unix://tmp/btfcgi;
#include fastcgi_params;
}
}

Может существует какая то волшебная опция, подскажите пожалуйста )
Subject Author Posted

Почему nginx убирает заголовок Content-Length с ответа fastcgi ?

petrofm October 08, 2014 04:03AM

Re: Почему nginx убирает заголовок Content-Length с ответа fastcgi ?

Валентин Бартенев October 08, 2014 04:14AM

Re: Почему nginx убирает заголовок Content-Length с ответа fastcgi ?

petrofm October 08, 2014 04:19AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 102
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready