'Gets metadata by doing a HEAD on a path and using the metadata_prefix
to get values from the headers returned.
:param path: Path to do HEAD on.
:param metadata_prefix: Used to filter values from the headers
returned.  Will strip that prefix from the
keys in the dict returned.  Defaults to \'\'.
:param acceptable_statuses: List of status for valid responses,
defaults to (2,).
:param headers: extra headers to send
:returns: A dict of metadata with metadata_prefix stripped from keys.
Keys will be lowercase.
:raises UnexpectedResponse: Exception raised when requests fail
to get a response with an acceptable status
:raises Exception: Exception is raised when code fails in an
unexpected way.'

def _get_metadata(self, path, metadata_prefix='', acceptable_statuses=(2,), headers=None):

    headers = (headers or {})
    resp = self.make_request('HEAD', path, headers, acceptable_statuses)
    metadata_prefix = metadata_prefix.lower()
    metadata = {}
    for (k, v) in resp.headers.items():
        if k.lower().startswith(metadata_prefix):
            metadata[k[len(metadata_prefix):].lower()] = v
    return metadata
