]> git.kaiwu.me - nginx.git/commitdiff
HTTP/2: fixed invalid headers handling (ticket #831).
authorValentin Bartenev <vbart@nginx.com>
Fri, 13 Nov 2015 17:10:50 +0000 (20:10 +0300)
committerValentin Bartenev <vbart@nginx.com>
Fri, 13 Nov 2015 17:10:50 +0000 (20:10 +0300)
The r->invalid_header flag wasn't reset once an invalid header appeared in a
request, resulting in all subsequent headers in the request were also marked
as invalid.

src/http/v2/ngx_http_v2.c

index 564f248c65ed843d7bff8f441c4abc6ab1df409d..e77c13a0ce7c67367b2530d0219e415572c3b927 100644 (file)
@@ -2949,6 +2949,8 @@ ngx_http_v2_validate_header(ngx_http_request_t *r, ngx_http_v2_header_t *header)
         return NGX_ERROR;
     }
 
+    r->invalid_header = 0;
+
     cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
 
     for (i = (header->name.data[0] == ':'); i != header->name.len; i++) {