Implement HEAD method due to changes in boto 2.25, closes: #91
This commit is contained in:
parent
436c0be866
commit
49ecfad6b1
@ -42,7 +42,14 @@ class ResponseObject(object):
|
|||||||
# If no bucket specified, list all buckets
|
# If no bucket specified, list all buckets
|
||||||
return self.all_buckets()
|
return self.all_buckets()
|
||||||
|
|
||||||
if method == 'GET':
|
if method == 'HEAD':
|
||||||
|
bucket = self.backend.get_bucket(bucket_name)
|
||||||
|
if bucket:
|
||||||
|
return 200, headers, ""
|
||||||
|
else:
|
||||||
|
return 404, headers, ""
|
||||||
|
|
||||||
|
elif method == 'GET':
|
||||||
bucket = self.backend.get_bucket(bucket_name)
|
bucket = self.backend.get_bucket(bucket_name)
|
||||||
if bucket:
|
if bucket:
|
||||||
prefix = querystring.get('prefix', [None])[0]
|
prefix = querystring.get('prefix', [None])[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user