broadway: make header name parsing case-insensitve

since http RFC state that the header names should be processed case in-sensitive, broadway should not rely on the actual case. E.g. the go-language libraries tend to rewrite the header, which cause problems with e.g. Caddy

Fixes #3406
This commit is contained in:
Benjamin Beichler 2020-11-27 11:34:09 +01:00 committed by Benjamin Beichler
parent 9d2ca90b4c
commit 8efde9c48c

View File

@ -1022,7 +1022,7 @@ parse_line (const char *line, const char *key)
{
const char *p;
if (!g_str_has_prefix (line, key))
if (g_ascii_strncasecmp (line, key, strlen (key)) != 0)
return NULL;
p = line + strlen (key);
if (*p != ':')