match content-type only at beginning of the line

This commit is contained in:
Christian Grothoff
2026-07-08 12:12:58 +02:00
parent d6fc384fc4
commit 026525d584
+5 -9
View File
@@ -595,16 +595,12 @@ try_match_header (const char *prefix,
{
if (NULL != *suffix)
return MHD_NO;
while (0 != *line)
if (MHD_str_equal_caseless_n_ (prefix,
line,
prefix_len))
{
if (MHD_str_equal_caseless_n_ (prefix,
line,
prefix_len))
{
*suffix = strdup (&line[prefix_len]);
return MHD_YES;
}
++line;
*suffix = strdup (&line[prefix_len]);
return MHD_YES;
}
return MHD_NO;
}