Welcome! Log In Create A New Profile

Advanced

Re: HTTP 1.1 parser whitespace in header value

Marin Stavrev
May 06, 2020 08:46AM
I had raised similar problem on December, 2019 -
http://mailman.nginx.org/pipermail/nginx-devel/2020-January/012942.html but
it had been put down as no other complains had been filed about it.

On Wed, May 6, 2020, 14:00 Андрей Аладьев <aladjev.andrew@gmail.com> wrote:

> Hello. I've read nginx HTTP parser and found the following line:
>
> /* header value */
> case sw_value:
> switch (ch) {
> case ' ':
> r->header_end = p;
> state = sw_space_after_value;
> break;
>
> It means that nginx HTTP parser will finish header value immediately after
> whitespace. But RFC 7230 declares the following:
>
> header-field = field-name ":" OWS field-value OWS
> field-value = *( field-content / obs-fold )
> field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
> field-vchar = VCHAR / obs-text
>
> "field-vchar [ 1*( SP / HTAB ) field-vchar ]" I think this ABNF means
> header value can have SP or HTAB between visible chars.
>
> So it looks like nginx HTTP parser is broken. What do you think about it?
> Thank you.
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

HTTP 1.1 parser whitespace in header value

Андрей Аладьев 71 May 06, 2020 07:02AM

Re: HTTP 1.1 parser whitespace in header value

Marin Stavrev 26 May 06, 2020 08:46AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

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