Revision 1495b972 pithos/api/functions.py
b/pithos/api/functions.py | ||
---|---|---|
128 | 128 |
# unauthorized (401), |
129 | 129 |
# badRequest (400) |
130 | 130 |
|
131 |
until = get_int_parameter(request, 'until')
|
|
131 |
until = get_int_parameter(request.GET.get('until'))
|
|
132 | 132 |
try: |
133 | 133 |
meta = backend.get_account_meta(request.user, v_account, until) |
134 | 134 |
groups = backend.get_account_groups(request.user, v_account) |
... | ... | |
171 | 171 |
# unauthorized (401), |
172 | 172 |
# badRequest (400) |
173 | 173 |
|
174 |
until = get_int_parameter(request, 'until')
|
|
174 |
until = get_int_parameter(request.GET.get('until'))
|
|
175 | 175 |
try: |
176 | 176 |
meta = backend.get_account_meta(request.user, v_account, until) |
177 | 177 |
groups = backend.get_account_groups(request.user, v_account) |
... | ... | |
239 | 239 |
# unauthorized (401), |
240 | 240 |
# badRequest (400) |
241 | 241 |
|
242 |
until = get_int_parameter(request, 'until')
|
|
242 |
until = get_int_parameter(request.GET.get('until'))
|
|
243 | 243 |
try: |
244 | 244 |
meta = backend.get_container_meta(request.user, v_account, v_container, until) |
245 | 245 |
meta['object_meta'] = backend.list_object_meta(request.user, v_account, v_container, until) |
... | ... | |
337 | 337 |
# unauthorized (401), |
338 | 338 |
# badRequest (400) |
339 | 339 |
|
340 |
until = get_int_parameter(request, 'until')
|
|
340 |
until = get_int_parameter(request.GET.get('until'))
|
|
341 | 341 |
try: |
342 | 342 |
meta = backend.get_container_meta(request.user, v_account, v_container, until) |
343 | 343 |
meta['object_meta'] = backend.list_object_meta(request.user, v_account, v_container, until) |
... | ... | |
827 | 827 |
if total is not None and (total != size or offset >= size or (length > 0 and offset + length >= size)): |
828 | 828 |
raise RangeNotSatisfiable('Supplied range will change provided object limits') |
829 | 829 |
|
830 |
dest_bytes = request.META.get('HTTP_X_OBJECT_BYTES') |
|
831 |
if dest_bytes is not None: |
|
832 |
dest_bytes = get_int_parameter(dest_bytes) |
|
833 |
if dest_bytes is None: |
|
834 |
raise BadRequest('Invalid X-Object-Bytes header') |
|
835 |
|
|
830 | 836 |
if src_object: |
831 | 837 |
if offset % backend.block_size == 0: |
832 | 838 |
# Update the hashes only. |
... | ... | |
872 | 878 |
|
873 | 879 |
if offset > size: |
874 | 880 |
size = offset |
881 |
if dest_bytes is not None and dest_bytes < size: |
|
882 |
size = dest_bytes |
|
883 |
hashmap = hashmap[:(int((size - 1) / backend.block_size) + 1)] |
|
875 | 884 |
meta.update({'hash': hashmap_hash(hashmap)}) # Update ETag. |
876 | 885 |
try: |
877 | 886 |
backend.update_object_hashmap(request.user, v_account, v_container, v_object, size, hashmap, meta, replace, permissions) |
Also available in: Unified diff