]> git.kaiwu.me - nginx.git/commitdiff
SPDY: fix support for headers with multiple values.
authorPiotr Sikora <piotr@cloudflare.com>
Tue, 8 Jul 2014 09:17:44 +0000 (02:17 -0700)
committerPiotr Sikora <piotr@cloudflare.com>
Tue, 8 Jul 2014 09:17:44 +0000 (02:17 -0700)
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>
src/http/ngx_http_spdy.c

index 810d8d8f4e244d8340ec50147a87e1ce486bb093..478036979f34df213a301715f8948cb7b0098f82 100644 (file)
@@ -2584,6 +2584,8 @@ ngx_http_spdy_parse_header(ngx_http_request_t *r)
                 r->header_end = p;
                 r->header_in->pos = p + 1;
 
+                r->state = sw_value;
+
                 return NGX_OK;
             }