http.c: Compare headers as case-insensitive

Web browsers such as lynx send "Content-length" instead of
"Content-Length" (as done by LibreWolf and Chromium).
This commit is contained in:
Xavier Del Campo Romero 2023-03-04 04:04:09 +01:00
parent 5a831267aa
commit 4ef6d1b86f
Signed by: xavi
GPG Key ID: 84FF3612A9BF43F2
1 changed files with 1 additions and 1 deletions

2
http.c
View File

@ -790,7 +790,7 @@ static int process_header(struct http_ctx *const h, const char *const line,
const struct header *const hdr = &headers[i];
int ret;
if (!strncmp(line, hdr->header, n) && (ret = hdr->f(h, value)))
if (!strncasecmp(line, hdr->header, n) && (ret = hdr->f(h, value)))
return ret;
}