diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index d1f7652f5044..cbda071ba1b7 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -405,6 +405,11 @@ nsHttpHandler::IsAcceptableEncoding(const char *enc) if (!PL_strncasecmp(enc, "x-", 2)) enc += 2; + // gzip and deflate are inherently acceptable in modern HTTP - always + // process them if a stream converter can also be found. + if (!PL_strcasecmp(enc, "gzip") || !PL_strcasecmp(enc, "deflate")) + return true; + return nsHttp::FindToken(mAcceptEncodings.get(), enc, HTTP_LWS ",") != nullptr; }