projects
/
pithos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4071933
)
Fix hashmap retrieve for object with manifest.
author
Antony Chazapis
<chazapis@gmail.com>
Fri, 17 Feb 2012 11:58:41 +0000
(13:58 +0200)
committer
Antony Chazapis
<chazapis@gmail.com>
Fri, 17 Feb 2012 11:58:41 +0000
(13:58 +0200)
Fixes #2058
pithos/api/functions.py
patch
|
blob
|
history
diff --git
a/pithos/api/functions.py
b/pithos/api/functions.py
index
3e9cd2c
..
b51c18f
100644
(file)
--- a/
pithos/api/functions.py
+++ b/
pithos/api/functions.py
@@
-695,9
+695,13
@@
def object_read(request, v_account, v_container, v_object):
response['ETag'] = meta['checksum']
return response
response['ETag'] = meta['checksum']
return response
+ hashmap_reply = False
+ if 'hashmap' in request.GET and request.serialization != 'text':
+ hashmap_reply = True
+
sizes = []
hashmaps = []
sizes = []
hashmaps = []
- if 'X-Object-Manifest' in meta:
+ if 'X-Object-Manifest' in meta and not hashmap_reply:
try:
src_container, src_name = split_container_object_string('/' + meta['X-Object-Manifest'])
objects = request.backend.list_objects(request.user_uniq, v_account,
try:
src_container, src_name = split_container_object_string('/' + meta['X-Object-Manifest'])
objects = request.backend.list_objects(request.user_uniq, v_account,
@@
-735,7
+739,7
@@
def object_read(request, v_account, v_container, v_object):
raise ItemNotFound('Version does not exist')
# Reply with the hashmap.
raise ItemNotFound('Version does not exist')
# Reply with the hashmap.
- if 'hashmap' in request.GET and request.serialization != 'text':
+ if hashmap_reply:
size = sum(sizes)
hashmap = sum(hashmaps, [])
d = {
size = sum(sizes)
hashmap = sum(hashmaps, [])
d = {