From dd3e0a7abdb34279a6feb3523117241e4e00393c Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 5 Jan 2020 04:54:58 +0300 Subject: [PATCH] Fixed incorrect method of parsing "brotli" from Accept-Encoding in HTTP --- dbms/programs/server/HTTPHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/programs/server/HTTPHandler.cpp b/dbms/programs/server/HTTPHandler.cpp index a93a88a0d5b..b2b3298693e 100644 --- a/dbms/programs/server/HTTPHandler.cpp +++ b/dbms/programs/server/HTTPHandler.cpp @@ -306,7 +306,7 @@ void HTTPHandler::processQuery( /// Both gzip and deflate are supported. If the client supports both, gzip is preferred. /// NOTE parsing of the list of methods is slightly incorrect. - if (http_response_compression_methods == "br") + if (std::string::npos != http_response_compression_methods.find("br")) http_response_compression_method = CompressionMethod::Brotli; else if (std::string::npos != http_response_compression_methods.find("gzip")) http_response_compression_method = CompressionMethod::Gzip;