Proxy Auto-Configuration (PAC) file should not be compressed (#916)

This commit is contained in:
Abhinav Singh 2021-12-28 11:47:34 +05:30 committed by GitHub
parent 8e3d724cd6
commit ea66280827
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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 = {}

View File

@ -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,
)