projects
/
pithos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4649954
)
Reply with the hashmap's hash as the ETag if no ETag present.
author
Antony Chazapis
<chazapis@gmail.com>
Thu, 8 Dec 2011 17:07:30 +0000
(19:07 +0200)
committer
Antony Chazapis
<chazapis@gmail.com>
Thu, 8 Dec 2011 17:07:30 +0000
(19:07 +0200)
pithos/api/util.py
patch
|
blob
|
history
diff --git
a/pithos/api/util.py
b/pithos/api/util.py
index
1ac568f
..
b2ec5e8
100644
(file)
--- a/
pithos/api/util.py
+++ b/
pithos/api/util.py
@@
-180,7
+180,7
@@
def get_object_headers(request):
return meta, get_sharing(request), get_public(request)
def put_object_headers(response, meta, restricted=False):
- response['ETag'] = meta['ETag']
+ response['ETag'] = meta['ETag'] if 'ETag' in meta else meta['hash']
response['Content-Length'] = meta['bytes']
response['Content-Type'] = meta.get('Content-Type', 'application/octet-stream')
response['Last-Modified'] = http_date(int(meta['modified']))