case-insensistive check for gzip and x-i2p-gzip

This commit is contained in:
orignal committed 2026-10-09 19:35:56 -04:00
1 parent 628f5d38a6
commit 822e4ed718
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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;