fix mime-type matching (#7882)

This commit is contained in:
Christian Grothoff 2023-07-05 18:20:46 +02:00
parent 95c05a8827
commit f2c3443860
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -131,6 +131,9 @@ mime_matches (const char *accept_pattern,
if ( (NULL == da) ||
(NULL == dm) )
return (0 == strcmp ("*", accept_pattern));
/* Note: technically, we might want to parse the "q=$FLOAT"
part after the ';' and figure out which one is the
best/preferred match instead of returning a boolean... */
end = strchr (da, ';');
if (NULL == end)
end = &da[strlen (da)];