mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-08-20 00:55:02 +00:00
is_brotli_encoding() and is_zstd_encoding() searched the Content-Encoding value for "br" and "zstd" as substrings, while is_zlib_encoding() beside them compared the whole value. So "fibre" and "librarian" were read as Brotli and "x-zstd-ish" as Zstandard, and "gzip, br" -- a value naming two codings, which cpp-httplib does not support -- was labeled Brotli and run through a Brotli decompressor over gzip data. RFC 9110 8.4.1 defines a content coding as a token, so compare the whole value case-insensitively as the zlib check already does. A value naming several codings no longer matches any of them and takes the pass-through path prepare_content_receiver() already documents for an unrecognized coding. contains_case_ignore() has no callers left.