Welcome! Log In Create A New Profile

Advanced

implicit *LWS ?

Alexandre Snarskii
October 06, 2010 07:50AM
Hi!

Дано: nginx/0.8.52 (собранный из FreeBSD ports без добавок), вот такой
вот запрос (обратите внимание на linear white space внутри поля Accept):

GET /picture.jpg HTTP/1.0
Accept: text/plain, text/html,
*/*
Host: .....

Пытаемся послать его через nginx с минимальным конфигом
(location /picture.jpg { proxy_pass http://....; proxy_set_header Host ....; })
в ngrep'е видим следующее:

T 192.168.13.202:52556 -> <....>:80 [AP]
GET /picture.jpg HTTP/1.0.
Host: ....
Connection: close.
Accept: text/plain, text/html,.
.

то есть nginx при проксировании обрезал весь контент поля начиная с CRLF.

То же самое происходит если пытаться передавать запрос на fastcgi backend,
в параметре HTTP_ACCEPT я вижу только text/plain, text/html, но не */*.
С другими хидерами происходит то же самое - как только встречается LWS -
поле "обрезается", что для proxy_pass, что для fastcgi_pass.

Вопрос: это бага или фича ? Если фича - обойти как-нибудь можно ?

PS: по RFC судя - бага, RFC2616 в разделе 2.1 говорит о impled *LWS:

implied *LWS

The grammar described by this specification is word-based. Except
where noted otherwise, linear white space (LWS) can be included between
any two adjacent words (token or quoted-string), and between adjacent
words and separators, without changing the interpretation of a field.

--
In theory, there is no difference between theory and practice.
But, in practice, there is.

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

implicit *LWS ?

Alexandre Snarskii October 06, 2010 07:50AM

Re: implicit *LWS ?

Valery Kholodkov October 06, 2010 08:54AM

Re: implicit *LWS ?

Alexandre Snarskii October 06, 2010 09:58AM

Re: implicit *LWS ?

Maxim Dounin October 06, 2010 09:44AM

Re: implicit *LWS ?

Alexandre Snarskii October 07, 2010 11:36AM

Re: implicit *LWS ?

Maxim Dounin October 07, 2010 12:08PM

Re: implicit *LWS ?

Alexandre Snarskii October 08, 2010 11:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 297
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