Revision 804e8fe7 pithos/api/functions.py
b/pithos/api/functions.py | ||
---|---|---|
43 | 43 |
|
44 | 44 |
from pithos.api.faults import (Fault, NotModified, BadRequest, Unauthorized, ItemNotFound, Conflict, |
45 | 45 |
LengthRequired, PreconditionFailed, RangeNotSatisfiable, UnprocessableEntity) |
46 |
from pithos.api.util import (format_header_key, printable_header_dict, get_account_headers, |
|
46 |
from pithos.api.util import (rename_meta_key, format_header_key, printable_header_dict, get_account_headers,
|
|
47 | 47 |
put_account_headers, get_container_headers, put_container_headers, get_object_headers, put_object_headers, |
48 | 48 |
update_manifest_meta, update_sharing_meta, update_public_meta, validate_modification_preconditions, |
49 | 49 |
validate_matching_preconditions, split_container_object_string, copy_or_move_object, |
... | ... | |
162 | 162 |
except NotAllowedError: |
163 | 163 |
raise Unauthorized('Access denied') |
164 | 164 |
else: |
165 |
rename_meta_key(meta, 'modified', 'last_modified') |
|
166 |
rename_meta_key(meta, 'until_timestamp', 'x_account_until_timestamp') |
|
165 | 167 |
for k, v in groups.iteritems(): |
166 | 168 |
meta['X-Container-Group-' + k] = ','.join(v) |
167 | 169 |
account_meta.append(printable_header_dict(meta)) |
... | ... | |
270 | 272 |
except NameError: |
271 | 273 |
pass |
272 | 274 |
else: |
275 |
rename_meta_key(meta, 'modified', 'last_modified') |
|
276 |
rename_meta_key(meta, 'until_timestamp', 'x_container_until_timestamp') |
|
273 | 277 |
for k, v in policy.iteritems(): |
274 | 278 |
meta['X-Container-Policy-' + k] = v |
275 | 279 |
container_meta.append(printable_header_dict(meta)) |
... | ... | |
472 | 476 |
except NameError: |
473 | 477 |
pass |
474 | 478 |
else: |
479 |
rename_meta_key(meta, 'modified', 'last_modified') |
|
480 |
rename_meta_key(meta, 'modified_by', 'x_object_modified_by') |
|
481 |
rename_meta_key(meta, 'version', 'x_object_version') |
|
482 |
rename_meta_key(meta, 'version_timestamp', 'x_object_version_timestamp') |
|
475 | 483 |
update_sharing_meta(permissions, v_account, v_container, x[0], meta) |
476 | 484 |
update_public_meta(public, meta) |
477 | 485 |
object_meta.append(printable_header_dict(meta)) |
Also available in: Unified diff