Skip to content

Commit

Permalink
Allow zstd compression for all filetypes
Browse files Browse the repository at this point in the history
  • Loading branch information
beavailable committed Apr 23, 2024
1 parent 49c7772 commit 2f10cb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def respond_for_file(self, file):
if status == HTTPStatus.OK and self.get_if_modified_since() == last_modified:
self.respond_not_modified(last_modified, content_type=content_type, accept_ranges=accept_ranges)
return
if status == HTTPStatus.OK and content_length >= 1024 and (file == 'favicon.ico' or content_type.startswith('text/')) and 'zstd' in self.get_accept_encoding() and self.init_compressor():
if status == HTTPStatus.OK and content_length >= 1024 and 'zstd' in self.get_accept_encoding() and self.init_compressor():
compress = True
content_length = None
transfer_encoding = 'chunked'
Expand Down

0 comments on commit 2f10cb0

Please sign in to comment.