Skip to content

Commit ea66280

Browse files
authored
Proxy Auto-Configuration (PAC) file should not be compressed (#916)
1 parent 8e3d724 commit ea66280

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

proxy/http/responses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def okResponse(
9090
**kwargs: Any,
9191
) -> memoryview:
9292
do_compress: bool = False
93-
if compress and flags.args and content and len(content) > flags.args.min_compression_limit:
93+
if flags.args and compress and content and len(content) > flags.args.min_compression_limit:
9494
do_compress = True
9595
if not headers:
9696
headers = {}

proxy/http/server/pac_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def cache_pac_file_response(self) -> None:
8080
content=content,
8181
headers={
8282
b'Content-Type': b'application/x-ns-proxy-autoconfig',
83-
b'Content-Encoding': b'gzip',
8483
},
8584
conn_close=True,
85+
compress=False,
8686
)

0 commit comments

Comments
 (0)