Loading lib/galaxy/util/zipstream.py +2 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,8 @@ class ZipstreamWrapper: def get_headers(self) -> Dict[str, str]: headers = {} if self.archive_name: headers["Content-Disposition"] = f'attachment; filename="{self.archive_name}.zip"' 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" else: Loading lib/galaxy_test/api/test_dataset_collections.py +8 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,14 @@ class TestDatasetCollectionsApi(ApiTestCase): namelist = archive.namelist() assert len(namelist) == 3, f"Expected 3 elements in [{namelist}]" def test_download_non_english_characters(self): with self.dataset_populator.test_history() as history_id: name = "دیتاست" payload = self.dataset_collection_populator.create_list_payload(history_id, name=name) hdca_id = self.dataset_populator.fetch(payload, wait=True).json()["outputs"][0]["id"] create_response = self._download_dataset_collection(history_id=history_id, hdca_id=hdca_id) self._assert_status_code_is(create_response, 200) @requires_new_user def test_hda_security(self): with self.dataset_populator.test_history(require_new=False) as history_id: Loading Loading
lib/galaxy/util/zipstream.py +2 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,8 @@ class ZipstreamWrapper: def get_headers(self) -> Dict[str, str]: headers = {} if self.archive_name: headers["Content-Disposition"] = f'attachment; filename="{self.archive_name}.zip"' 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" else: Loading
lib/galaxy_test/api/test_dataset_collections.py +8 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,14 @@ class TestDatasetCollectionsApi(ApiTestCase): namelist = archive.namelist() assert len(namelist) == 3, f"Expected 3 elements in [{namelist}]" def test_download_non_english_characters(self): with self.dataset_populator.test_history() as history_id: name = "دیتاست" payload = self.dataset_collection_populator.create_list_payload(history_id, name=name) hdca_id = self.dataset_populator.fetch(payload, wait=True).json()["outputs"][0]["id"] create_response = self._download_dataset_collection(history_id=history_id, hdca_id=hdca_id) self._assert_status_code_is(create_response, 200) @requires_new_user def test_hda_security(self): with self.dataset_populator.test_history(require_new=False) as history_id: Loading