Revision 8e95eb05
b/snf-pithos-app/pithos/api/util.py | ||
---|---|---|
217 | 217 |
def put_object_headers(response, meta, restricted=False, token=None): |
218 | 218 |
response['ETag'] = meta['checksum'] |
219 | 219 |
response['Content-Length'] = meta['bytes'] |
220 |
response.override_serialization = True |
|
220 | 221 |
response['Content-Type'] = meta.get('type', 'application/octet-stream') |
221 | 222 |
response['Last-Modified'] = http_date(int(meta['modified'])) |
222 | 223 |
if not restricted: |
... | ... | |
927 | 928 |
boundary = '' |
928 | 929 |
wrapper = ObjectWrapper(request.backend, ranges, sizes, hashmaps, boundary) |
929 | 930 |
response = HttpResponse(wrapper, status=ret) |
930 |
response.override_serialization = True |
|
931 | 931 |
put_object_headers( |
932 | 932 |
response, meta, restricted=public, |
933 | 933 |
token=getattr(request, 'token', None)) |
Also available in: Unified diff