mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 06:03:31 -06:00
SPDY: stop emitting multiple empty header values.
Previously, nginx would emit empty values in a header with multiple, NULL-separated values. This is forbidden by the SPDY specification, which requires headers to have either a single (possibly empty) value or multiple, NULL-separated non-empty values. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
This commit is contained in:
parent
78dd8b5eda
commit
54606d4625
@ -493,9 +493,13 @@ ngx_http_spdy_header_filter(ngx_http_request_t *r)
|
||||
continue;
|
||||
}
|
||||
|
||||
*last++ = '\0';
|
||||
if (h[j].value.len) {
|
||||
if (last != p) {
|
||||
*last++ = '\0';
|
||||
}
|
||||
|
||||
last = ngx_cpymem(last, h[j].value.data, h[j].value.len);
|
||||
last = ngx_cpymem(last, h[j].value.data, h[j].value.len);
|
||||
}
|
||||
|
||||
h[j].hash = 2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user