'Determines if a bucket exists by name.
If the bucket does not exist, an ``S3ResponseError`` will be raised.
:type bucket_name: string
:param bucket_name: The name of the bucket
:type headers: dict
:param headers: Additional headers to pass along with the request to
AWS.
:returns: A <Bucket> object'

def head_bucket(self, bucket_name, headers=None):

    response = self.make_request('HEAD', bucket_name, headers=headers)
    body = response.read()
    if (response.status == 200):
        return self.bucket_class(self, bucket_name)
    elif (response.status == 403):
        err = self.provider.storage_response_error(response.status, response.reason, body)
        err.error_code = 'AccessDenied'
        err.error_message = 'Access    Denied'
        raise err
    elif (response.status == 404):
        err = self.provider.storage_response_error(response.status, response.reason, body)
        err.error_code = 'NoSuchBucket'
        err.error_message = 'The    specified    bucket    does    not    exist'
        raise err
    else:
        raise self.provider.storage_response_error(response.status, response.reason, body)
