Skip to content

Commit ab477b5

Browse files
committed
Fix "Issue 37742 in oss-fuzz: cpp-httplib:server_fuzzer: Timeout in server_fuzzer"
1 parent 0823d5c commit ab477b5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

httplib.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3216,8 +3216,7 @@ bool prepare_content_receiver(T &x, int &status,
32163216
std::string encoding = x.get_header_value("Content-Encoding");
32173217
std::unique_ptr<decompressor> decompressor;
32183218

3219-
if (encoding.find("gzip") != std::string::npos ||
3220-
encoding.find("deflate") != std::string::npos) {
3219+
if (encoding == "gzip" || encoding == "deflate") {
32213220
#ifdef CPPHTTPLIB_ZLIB_SUPPORT
32223221
decompressor = detail::make_unique<gzip_decompressor>();
32233222
#else

0 commit comments

Comments
 (0)