mirror of
https://github.com/nginx/nginx.git
synced 2024-12-02 20:09:01 +08:00
Apply underscores_in_headers also to the first character.
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
This commit is contained in:
parent
b1597fe2ea
commit
ac1617915c
@ -886,6 +886,19 @@ ngx_http_parse_header_line(ngx_http_request_t *r, ngx_buf_t *b,
|
||||
break;
|
||||
}
|
||||
|
||||
if (ch == '_') {
|
||||
if (allow_underscores) {
|
||||
hash = ngx_hash(0, ch);
|
||||
r->lowcase_header[0] = ch;
|
||||
i = 1;
|
||||
|
||||
} else {
|
||||
r->invalid_header = 1;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (ch == '\0') {
|
||||
return NGX_HTTP_PARSE_INVALID_HEADER;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user