From 9afb912c6471376cbc4907b58ec2904fceb0a797 Mon Sep 17 00:00:00 2001 From: UltraQbik Date: Fri, 23 Aug 2024 21:14:48 +0300 Subject: Update compression thing --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index de605b6..755da18 100644 --- a/main.py +++ b/main.py @@ -144,7 +144,7 @@ class HTTPServer: response = Response(data, STATUS_CODE_NOT_FOUND) # process header data - if response.headers.get("Content-Encoding") is None: + if response.headers.get("Content-Encoding") is None and response.compress: supported_compressions = [x.strip() for x in getattr(request, "Accept-Encoding", "").split(",")] if "br" in supported_compressions: response.headers["Content-Encoding"] = "br" -- cgit 1.4.1