Revision dfa2d4ba snf-pithos-app/pithos/api/functions.py
b/snf-pithos-app/pithos/api/functions.py | ||
---|---|---|
494 | 494 |
# itemNotFound (404), |
495 | 495 |
# forbidden (403), |
496 | 496 |
# badRequest (400) |
497 |
# requestentitytoolarge (413) |
|
497 | 498 |
|
498 | 499 |
until = get_int_parameter(request.GET.get('until')) |
499 | 500 |
|
... | ... | |
509 | 510 |
raise ItemNotFound('Container does not exist') |
510 | 511 |
except ContainerNotEmpty: |
511 | 512 |
raise Conflict('Container is not empty') |
513 |
except QuotaError, e: |
|
514 |
raise RequestEntityTooLarge('Quota error: %s' % e) |
|
512 | 515 |
return HttpResponse(status=204) |
513 | 516 |
|
514 | 517 |
|
... | ... | |
866 | 869 |
# itemNotFound (404), |
867 | 870 |
# forbidden (403), |
868 | 871 |
# badRequest (400) |
872 |
# requestentitytoolarge (413) |
|
869 | 873 |
|
870 | 874 |
# Evaluate conditions. |
871 | 875 |
if request.META.get('HTTP_IF_MATCH') or request.META.get('HTTP_IF_NONE_MATCH'): |
... | ... | |
1012 | 1016 |
# itemNotFound (404), |
1013 | 1017 |
# forbidden (403), |
1014 | 1018 |
# badRequest (400) |
1019 |
# requestentitytoolarge (413) |
|
1015 | 1020 |
|
1016 | 1021 |
request.upload_handlers = [SaveToBackendHandler(request)] |
1017 | 1022 |
if 'X-Object-Data' not in request.FILES: |
... | ... | |
1044 | 1049 |
# itemNotFound (404), |
1045 | 1050 |
# forbidden (403), |
1046 | 1051 |
# badRequest (400) |
1052 |
# requestentitytoolarge (413) |
|
1047 | 1053 |
|
1048 | 1054 |
dest_account = request.META.get('HTTP_DESTINATION_ACCOUNT') |
1049 | 1055 |
if not dest_account: |
... | ... | |
1085 | 1091 |
# itemNotFound (404), |
1086 | 1092 |
# forbidden (403), |
1087 | 1093 |
# badRequest (400) |
1094 |
# requestentitytoolarge (413) |
|
1088 | 1095 |
|
1089 | 1096 |
dest_account = request.META.get('HTTP_DESTINATION_ACCOUNT') |
1090 | 1097 |
if not dest_account: |
... | ... | |
1336 | 1343 |
# itemNotFound (404), |
1337 | 1344 |
# forbidden (403), |
1338 | 1345 |
# badRequest (400) |
1346 |
# requestentitytoolarge (413) |
|
1339 | 1347 |
|
1340 | 1348 |
until = get_int_parameter(request.GET.get('until')) |
1341 | 1349 |
delimiter = request.GET.get('delimiter') |
... | ... | |
1348 | 1356 |
raise Forbidden('Not allowed') |
1349 | 1357 |
except ItemNotExists: |
1350 | 1358 |
raise ItemNotFound('Object does not exist') |
1359 |
except QuotaError, e: |
|
1360 |
raise RequestEntityTooLarge('Quota error: %s' % e) |
|
1351 | 1361 |
return HttpResponse(status=204) |
1352 | 1362 |
|
1353 | 1363 |
|
Also available in: Unified diff