changeset 6291:932a465537ef

HTTP/2: fixed invalid headers handling (ticket #831). 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.
author Valentin Bartenev <vbart@nginx.com>
date Fri, 13 Nov 2015 20:10:50 +0300
parents 4d5ac1a31d44
children f72d3129cd35
files src/http/v2/ngx_http_v2.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -2949,6 +2949,8 @@ ngx_http_v2_validate_header(ngx_http_req
         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++) {