Fix "Issue 37742 in oss-fuzz: cpp-httplib:server_fuzzer: Timeout in server_fuzzer"

This commit is contained in:
yhirose 2021-09-02 22:57:57 -04:00
parent 0823d5c7f2
commit ab477b5631

View file

@ -3216,8 +3216,7 @@ bool prepare_content_receiver(T &x, int &status,
std::string encoding = x.get_header_value("Content-Encoding");
std::unique_ptr<decompressor> decompressor;
if (encoding.find("gzip") != std::string::npos ||
encoding.find("deflate") != std::string::npos) {
if (encoding == "gzip" || encoding == "deflate") {
#ifdef CPPHTTPLIB_ZLIB_SUPPORT
decompressor = detail::make_unique<gzip_decompressor>();
#else