Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7066533
D2507.id8906.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D2507.id8906.diff
View Options
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
Details
Attached
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
Attached To
D2507: api/private/read: use application/zip as content_type
Event Timeline
Log In to Comment