Revision 83b4c5fa
b/pithos/public/functions.py | ||
---|---|---|
36 | 36 |
from django.http import HttpResponse |
37 | 37 |
|
38 | 38 |
from pithos.api.faults import (Fault, BadRequest, ItemNotFound) |
39 |
from pithos.api.util import (put_object_meta, update_manifest_meta,
|
|
39 |
from pithos.api.util import (put_object_headers, update_manifest_meta,
|
|
40 | 40 |
validate_modification_preconditions, validate_matching_preconditions, |
41 | 41 |
object_data_response, api_method) |
42 | 42 |
from pithos.backends import backend |
... | ... | |
125 | 125 |
raise ItemNotFound('Object does not exist') |
126 | 126 |
else: |
127 | 127 |
try: |
128 |
s, h = backend.get_object_hashmap(request.user, v_account, v_container, v_object, version)
|
|
128 |
s, h = backend.get_object_hashmap(request.user, v_account, v_container, v_object) |
|
129 | 129 |
sizes.append(s) |
130 | 130 |
hashmaps.append(h) |
131 | 131 |
except: |
... | ... | |
134 | 134 |
return object_data_response(request, sizes, hashmaps, meta, True) |
135 | 135 |
|
136 | 136 |
@api_method() |
137 |
def method_not_allowed(request): |
|
137 |
def method_not_allowed(request, **v_args):
|
|
138 | 138 |
raise ItemNotFound('Object does not exist') |
b/pithos/public/urls.py | ||
---|---|---|
37 | 37 |
urlpatterns = patterns('pithos.public.functions', |
38 | 38 |
(r'^$', 'method_not_allowed'), |
39 | 39 |
(r'^(?P<v_account>.+?)/(?P<v_container>.+?)/(?P<v_object>.+?)$', 'object_demux'), |
40 |
(r'^(?P<v_account>.+?)/(?P<v_container>.+?)$', 'method_not_allowed'), |
|
41 |
(r'^(?P<v_account>.+?)$', 'method_not_allowed') |
|
40 |
(r'^(?P<v_account>.+?)/(?P<v_container>.+?)/?$', 'method_not_allowed'),
|
|
41 |
(r'^(?P<v_account>.+?)/?$', 'method_not_allowed')
|
|
42 | 42 |
) |
Also available in: Unified diff