diff --git a/proxy/http/responses.py b/proxy/http/responses.py index 9e865cd2..65b548b3 100644 --- a/proxy/http/responses.py +++ b/proxy/http/responses.py @@ -90,7 +90,7 @@ def okResponse( **kwargs: Any, ) -> memoryview: do_compress: bool = False - if compress and flags.args and content and len(content) > flags.args.min_compression_limit: + if flags.args and compress and content and len(content) > flags.args.min_compression_limit: do_compress = True if not headers: headers = {} diff --git a/proxy/http/server/pac_plugin.py b/proxy/http/server/pac_plugin.py index befe483a..8cc0a4d0 100644 --- a/proxy/http/server/pac_plugin.py +++ b/proxy/http/server/pac_plugin.py @@ -80,7 +80,7 @@ class HttpWebServerPacFilePlugin(HttpWebServerBasePlugin): content=content, headers={ b'Content-Type': b'application/x-ns-proxy-autoconfig', - b'Content-Encoding': b'gzip', }, conn_close=True, + compress=False, )