# HG changeset patch # User Valentin Bartenev # Date 1376579769 -14400 # Node ID 8ef1722143dccf9f884010e448263bbbfe08dab5 # Parent 2be1a9ce9d8e91eab48ce61286a926ee74605b57 SPDY: do not reject headers with empty value (ticket #396). A quote from SPDY draft 2 specification: "The length of each name and value must be greater than zero. A receiver of a zero-length name or value must send a RST_STREAM with code PROTOCOL error." But it appears that Chrome browser allows sending requests over SPDY/2 connection using JavaScript that contain headers with empty values. For better compatibility across SPDY clients and to be compliant with HTTP, such headers are no longer rejected. Also, it is worth noting that in SPDY draft 3 the statement has been changed so that it permits empty values for headers. diff --git a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c --- a/src/http/ngx_http_spdy.c +++ b/src/http/ngx_http_spdy.c @@ -2014,10 +2014,6 @@ ngx_http_spdy_parse_header(ngx_http_requ len = ngx_spdy_frame_parse_uint16(p); - if (!len) { - return NGX_ERROR; - } - /* null-terminate header name */ *p = '\0';