httpd gzip compression / set a response header and search for gzip in the request header in case deflate is added to gzip in there
This commit is contained in:
		@@ -164,9 +164,10 @@ namespace ix
 | 
			
		||||
                std::string content = res.second;
 | 
			
		||||
 | 
			
		||||
                std::string acceptEncoding = request->headers["Accept-encoding"];
 | 
			
		||||
                if (acceptEncoding == "gzip" || acceptEncoding == "*")
 | 
			
		||||
                if (acceptEncoding == "*" || acceptEncoding.find("gzip") != std::string::npos)
 | 
			
		||||
                {
 | 
			
		||||
                    content = gzipCompress(content);
 | 
			
		||||
                    headers["Content-Encoding"] = "gzip";
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                // Log request
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user