Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] SPDY: fix support for headers with multiple values

Valentin V. Bartenev
July 08, 2014 06:08AM
On Tuesday 08 July 2014 13:44:30 Valentin V. Bartenev wrote:
> On Tuesday 08 July 2014 02:29:21 Piotr Sikora wrote:
> > # HG changeset patch
> > # User Piotr Sikora <piotr@cloudflare.com>
> > # Date 1404811064 25200
> > # Tue Jul 08 02:17:44 2014 -0700
> > # Node ID 0d4b16900e55bc3495fb63b3e93f06cac690497b
> > # Parent a680bf4dddd5c4b106419e3dfb0264815c401275
> > SPDY: fix support for headers with multiple values.
> >
> > Split SPDY header with multiple, NULL-separated values:
> >
> > cookie: foo\0bar
> >
> > into two separate HTTP headers with the same name:
> >
> > cookie: foo
> > cookie: bar
> >
> > Even though the logic for this behavior already existed
> > in the source code, it doesn't look that it ever worked
> > and SPDY streams with such headers were simply rejected.
> >
> > Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
> >
> > diff -r a680bf4dddd5 -r 0d4b16900e55 src/http/ngx_http_spdy.c
> > --- a/src/http/ngx_http_spdy.c Sat Jul 05 23:29:47 2014 +0400
> > +++ b/src/http/ngx_http_spdy.c Tue Jul 08 02:17:44 2014 -0700
> > @@ -2584,6 +2584,8 @@ ngx_http_spdy_parse_header(ngx_http_requ
> > r->header_end = p;
> > r->header_in->pos = p + 1;
> >
> > + r->state = state;
> > +
> > return NGX_OK;
> > }
> >
>
> Nice catch, thank you.
>
> Maxim, do you approve this for push?
>
[..]

Probably, it's better to use constant here (like r->state = 0 in
the same function):

diff -r 9d3a9c45fc43 src/http/ngx_http_spdy.c
--- a/src/http/ngx_http_spdy.c Tue Jul 01 20:52:08 2014 +0400
+++ b/src/http/ngx_http_spdy.c Tue Jul 08 13:55:52 2014 +0400
@@ -2584,6 +2584,8 @@ ngx_http_spdy_parse_header(ngx_http_requ
r->header_end = p;
r->header_in->pos = p + 1;

+ r->state = sw_value;
+
return NGX_OK;
}


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

[PATCH] SPDY: fix support for headers with multiple values

Piotr Sikora 615 July 08, 2014 05:30AM

Re: [PATCH] SPDY: fix support for headers with multiple values

Valentin V. Bartenev 232 July 08, 2014 05:46AM

Re: [PATCH] SPDY: fix support for headers with multiple values

Valentin V. Bartenev 281 July 08, 2014 06:08AM



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

Online Users

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