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,
|
50 |
|
get_int_parameter, get_content_length, get_content_range, raw_input_socket,
|
51 |
|
socket_read_iterator, object_data_response, put_object_block, hashmap_hash, api_method)
|
|
50 |
get_int_parameter, get_content_length, get_content_range, socket_read_iterator,
|
|
51 |
object_data_response, put_object_block, hashmap_hash, api_method)
|
52 |
52 |
from pithos.backends import backend
|
53 |
53 |
from pithos.backends.base import NotAllowedError
|
54 |
54 |
|
... | ... | |
706 |
706 |
|
707 |
707 |
if request.serialization != 'text':
|
708 |
708 |
data = ''
|
709 |
|
sock = raw_input_socket(request)
|
710 |
|
for block in socket_read_iterator(sock, content_length, backend.block_size):
|
|
709 |
for block in socket_read_iterator(request, content_length, backend.block_size):
|
711 |
710 |
data = '%s%s' % (data, block)
|
712 |
711 |
|
713 |
712 |
if request.serialization == 'json':
|
... | ... | |
737 |
736 |
md5 = hashlib.md5()
|
738 |
737 |
size = 0
|
739 |
738 |
hashmap = []
|
740 |
|
sock = raw_input_socket(request)
|
741 |
|
for data in socket_read_iterator(sock, content_length, backend.block_size):
|
|
739 |
for data in socket_read_iterator(request, content_length, backend.block_size):
|
742 |
740 |
# TODO: Raise 408 (Request Timeout) if this takes too long.
|
743 |
741 |
# TODO: Raise 499 (Client Disconnect) if a length is defined and we stop before getting this much data.
|
744 |
742 |
size += len(data)
|
... | ... | |
1022 |
1020 |
length -= bytes
|
1023 |
1021 |
sbi += 1
|
1024 |
1022 |
else:
|
1025 |
|
sock = raw_input_socket(request)
|
1026 |
1023 |
data = ''
|
1027 |
|
for d in socket_read_iterator(sock, length, backend.block_size):
|
|
1024 |
for d in socket_read_iterator(request, length, backend.block_size):
|
1028 |
1025 |
# TODO: Raise 408 (Request Timeout) if this takes too long.
|
1029 |
1026 |
# TODO: Raise 499 (Client Disconnect) if a length is defined and we stop before getting this much data.
|
1030 |
1027 |
data += d
|