nginx отдает неправильный хедер Content-Type

Станислав server_inc at list.ru
Wed Oct 28 22:36:00 MSK 2009


Здравствуйте!
Вот недавно столкнулся с проблемой...

Linux Gentoo

$ nginx -V
nginx version: nginx/0.7.62
configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf 
--http-log-path=/var/log/nginx/access_log 
--error-log-path=/var/log/nginx/error_log --pid-path=/var/run/nginx.pid 
--http-client-body-temp-path=/var/tmp/nginx/client 
--http-proxy-temp-path=/var/tmp/nginx/proxy 
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --with-md5-asm 
--with-md5=/usr/include --with-sha1-asm --with-sha1=/usr/include 
--with-http_realip_module --with-http_flv_module --with-http_ssl_module 
--with-http_perl_module --with-http_stub_status_module

есть директория /forum/style_images/

изначально все прекрасно...
говорю энджинксу превед
GET /forum/style_images/css_2.css HTTP/1.0
........
отвечает нормально
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 28 Oct 2009 19:16:36 GMT
Content-Type: text/css
Content-Length: 31730
Last-Modified: Sat, 18 Apr 2009 09:48:59 GMT
Connection: close
Accept-Ranges: bytes

решил дать права энджинксу на запись этой директории... пускай люди 
грузят туда картинки и файлы стилей через админку...
но предварительно убрав выполнения фэст-цги скриптов ... ибо ну нафиг

location ^~ /forum/style_images/ {
            root   /var/www/blahblah.ru;
            types {
                text/plain php php3 php4 php5 phtml phps pl pm;
            }
        }

и тут пдыщ......
вот что мне энджинкс ответил

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 28 Oct 2009 19:21:31 GMT
Content-Type: application/octet-stream
Content-Length: 31730
Last-Modified: Sat, 18 Apr 2009 09:48:59 GMT
Connection: close
Accept-Ranges: bytes

в mime.types четко написано
.....
text/css                              css;
.....
application/octet-stream              bin exe dll;
application/octet-stream              deb;
application/octet-stream              dmg;
application/octet-stream              eot;
application/octet-stream              iso img;
application/octet-stream              msi msp msm;
......
nginx.conf
....
http {
        include         /etc/nginx/mime.types;
        default_type    application/octet-stream;
....

из-за неправильного ответа, Лиса вообще не загружает файлы стиля...
матерится.... говорит :
"Ошибка: Таблица стилей http://...../forum/style_images/css_2.css не 
была загружена, потому что её MIME-тип («application/octet-stream») не 
«text/css»."
Оперу и IE8.0 вроде как все устраивает... видимо они пофигистически 
относится к неправильному заголовку...

собственно вопросик... это баг или фича?








More information about the nginx-ru mailing list