Mercurial > hg > nginx
changeset 7580:8f55cb5c7e79
Fixed header parsing with ignore_invalid_headers switched off.
The parsing was broken when the first character of the header name was invalid.
Based on a patch by Alan Kemp.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 15 Oct 2019 14:46:10 +0300 |
parents | 6208c5418c88 |
children | afceb32f3a8a |
files | src/http/ngx_http_parse.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_parse.c Tue Oct 08 21:56:14 2019 +0300 +++ b/src/http/ngx_http_parse.c Tue Oct 15 14:46:10 2019 +0300 @@ -912,6 +912,8 @@ i = 1; } else { + hash = 0; + i = 0; r->invalid_header = 1; } @@ -922,6 +924,8 @@ return NGX_HTTP_PARSE_INVALID_HEADER; } + hash = 0; + i = 0; r->invalid_header = 1; break;