Merge pull request #92 from EvaSDK/implement-head-get-bucket

Implement HEAD method due to changes in boto 2.25, closes: #91
This commit is contained in:
Steve Pulec 2014-02-10 14:41:04 -05:00
commit b3f0c2e864

View File

@ -42,7 +42,14 @@ class ResponseObject(object):
# If no bucket specified, list 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)
if bucket:
prefix = querystring.get('prefix', [None])[0]