Page MenuHomeSoftware Heritage

D2507.id8906.diff
No OneTemporary

D2507.id8906.diff

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

File Metadata

Mime Type
text/plain
Expires
Nov 5 2024, 2:42 PM (11 w, 15 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216631

Event Timeline