diff --git a/libi2pd/HTTP.cpp b/libi2pd/HTTP.cpp index 1bccebdd..e97c6cfa 100644 --- a/libi2pd/HTTP.cpp +++ b/libi2pd/HTTP.cpp @@ -451,9 +451,9 @@ namespace http for (auto& directive: encodingDirectives) { boost::algorithm::trim (directive); - if (directive == "gzip") + if (boost::iequals (directive, "gzip")) return true; /* gotcha! */ - if (includingI2PGzip && directive == "x-i2p-gzip") + if (includingI2PGzip && boost::iequals (directive, "x-i2p-gzip")) return true; } return false; diff --git a/libi2pd_client/AddressBook.cpp b/libi2pd_client/AddressBook.cpp index b3e87af6..e919230d 100644 --- a/libi2pd_client/AddressBook.cpp +++ b/libi2pd_client/AddressBook.cpp @@ -1102,8 +1102,8 @@ namespace client if (!lastModified.empty ()) m_LastModified = std::string (lastModified); // parse response LogPrint (eLogInfo, "Addressbook: Got update from ", dest_host); - if (res[boost::beast::http::field::content_encoding] == "gzip" || - res[boost::beast::http::field::content_encoding] =="x-i2p-gzip") + if (boost::iequals (res[boost::beast::http::field::content_encoding], "gzip") || + boost::iequals (res[boost::beast::http::field::content_encoding], "x-i2p-gzip")) { std::stringstream unzipped; i2p::data::GzipInflator inflator;