Skip to content

Commit

Permalink
Refactor zipstream.py to use latin-1 encoding for archive name (The H…
Browse files Browse the repository at this point in the history
…TTP Header encoding must be latin-1)
  • Loading branch information
arash77 committed Jul 22, 2024
1 parent 172ecc5 commit 00cb14c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/util/zipstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def response(self) -> Iterator[bytes]:
def get_headers(self) -> Dict[str, str]:
headers = {}
if self.archive_name:
archive_name = self.archive_name.encode("utf-8", "replace").decode("latin-1")
archive_name = self.archive_name.encode("latin-1", "replace").decode("latin-1")
headers["Content-Disposition"] = f'attachment; filename="{archive_name}.zip"'
if self.upstream_mod_zip:
headers["X-Archive-Files"] = "zip"
Expand Down

0 comments on commit 00cb14c

Please sign in to comment.