diff options
| author | UltraQbik <no1skill@yandex.ru> | 2024-08-23 21:14:48 +0300 |
|---|---|---|
| committer | UltraQbik <no1skill@yandex.ru> | 2024-08-23 21:14:48 +0300 |
| commit | 9afb912c6471376cbc4907b58ec2904fceb0a797 (patch) | |
| tree | 5d64e0bc4e7ac748a4d4393c6cb0660a7f802a5e | |
| parent | 9b5c0ee8f79b24a0a269be2a9984dc09244fd278 (diff) | |
| download | httpy-9afb912c6471376cbc4907b58ec2904fceb0a797.tar.gz httpy-9afb912c6471376cbc4907b58ec2904fceb0a797.zip | |
Update compression thing
| -rw-r--r-- | main.py | 2 |
1 files changed, 1 insertions, 1 deletions
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" |