Welcome! Log In Create A New Profile

Advanced

[nginx] SPDY: stop emitting multiple empty header values.

Valentin Bartenev
October 28, 2014 03:04PM
details: http://hg.nginx.org/nginx/rev/87ada3ba1392
branches:
changeset: 5891:87ada3ba1392
user: Piotr Sikora <piotr@cloudflare.com>
date: Mon Oct 27 14:25:56 2014 -0700
description:
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>

diffstat:

src/http/ngx_http_spdy_filter_module.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 049c3ea24480 -r 87ada3ba1392 src/http/ngx_http_spdy_filter_module.c
--- a/src/http/ngx_http_spdy_filter_module.c Tue Oct 28 21:58:49 2014 +0300
+++ b/src/http/ngx_http_spdy_filter_module.c Mon Oct 27 14:25:56 2014 -0700
@@ -493,9 +493,13 @@ ngx_http_spdy_header_filter(ngx_http_req
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;
}

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

[nginx] SPDY: stop emitting multiple empty header values.

Valentin Bartenev 575 October 28, 2014 03:04PM



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

Online Users

Guests: 160
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready