Welcome! Log In Create A New Profile

Advanced

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

San
October 28, 2009 03:54PM
Здравствуйте!
Вот недавно столкнулся с проблемой...

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 вроде как все устраивает... видимо они пофигистически
относится к неправильному заголовку...

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

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

San October 28, 2009 03:54PM

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

Andrew Kopeyko October 28, 2009 04:24PM

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

San October 28, 2009 04:50PM

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

Andrew Kopeyko October 29, 2009 08:02AM

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

Sergey Shepelev October 29, 2009 02:08PM

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

Sergey Shepelev October 28, 2009 07:20PM

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

San October 28, 2009 08:32PM

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

Sergey Shepelev October 29, 2009 01:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 228
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready