mirror of
https://github.com/nginx/nginx.git
synced 2024-12-27 17:31:35 -06:00
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.
This commit is contained in:
parent
85137dd2a6
commit
3c84e4b705
@ -912,6 +912,8 @@ ngx_http_parse_header_line(ngx_http_request_t *r, ngx_buf_t *b,
|
||||
i = 1;
|
||||
|
||||
} else {
|
||||
hash = 0;
|
||||
i = 0;
|
||||
r->invalid_header = 1;
|
||||
}
|
||||
|
||||
@ -922,6 +924,8 @@ ngx_http_parse_header_line(ngx_http_request_t *r, ngx_buf_t *b,
|
||||
return NGX_HTTP_PARSE_INVALID_HEADER;
|
||||
}
|
||||
|
||||
hash = 0;
|
||||
i = 0;
|
||||
r->invalid_header = 1;
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user