mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-21 03:00:58 +00:00
parse_accept_header() split on every ',' and then on every ';', with no idea that a parameter value can be a quoted-string (RFC 9110 §5.6.6). A value such as text/html;profile="a,b" was cut in the middle, and the request was answered with 400. The parser never looks at a parameter value, so remove each quoted-string (§5.6.4) before parsing rather than teach every split about quotes. A header without a '"' takes the same path as before. A quoted-string is removed wherever it appears, so a malformed value can now be read without it instead of being rejected, and an unterminated quote hides the rest of the value.