Implement HEAD method due to changes in boto 2.25, closes: #91

This commit is contained in:
Gilles Dartiguelongue 2014-02-10 12:18:06 +01:00
parent 436c0be866
commit 49ecfad6b1

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]