diff --git a/swh/deposit/api/private/deposit_read.py b/swh/deposit/api/private/deposit_read.py --- a/swh/deposit/api/private/deposit_read.py +++ b/swh/deposit/api/private/deposit_read.py @@ -95,7 +95,7 @@ with aggregate_tarballs(self.extraction_dir, archive_paths) as path: return FileResponse(open(path, 'rb'), status=status.HTTP_200_OK, - content_type='application/octet-stream') + content_type='application/zip') class SWHDepositReadMetadata(SWHPrivateAPIView, SWHGetDepositAPI, diff --git a/swh/deposit/tests/api/test_deposit_private_read_archive.py b/swh/deposit/tests/api/test_deposit_private_read_archive.py --- a/swh/deposit/tests/api/test_deposit_private_read_archive.py +++ b/swh/deposit/tests/api/test_deposit_private_read_archive.py @@ -36,7 +36,7 @@ r = authenticated_client.get(url) assert r.status_code == status.HTTP_200_OK - assert r._headers['content-type'][1] == 'application/octet-stream' + assert r._headers['content-type'][1] == 'application/zip' # read the stream data = b''.join(r.streaming_content) @@ -76,7 +76,7 @@ r = authenticated_client.get(url) assert r.status_code == status.HTTP_200_OK - assert r._headers['content-type'][1] == 'application/octet-stream' + assert r._headers['content-type'][1] == 'application/zip' # read the stream data = b''.join(r.streaming_content) # extract the file from the zip