# Buggy code
def content_locate(
    self,
    account=None,
    reference=None,
    path=None,
    cid=None,
    content=None,
    version=None,
    **kwargs,
):
    """
    Get a description of the content along with the list of its chunks.

    :param cid: container id that can be used in place of `account`
        and `reference`
    :type cid: hexadecimal `str`
    :param content: content id that can be used in place of `path`
    :type content: hexadecimal `str`
    :returns: a tuple with content metadata `dict` as first element
        and chunk `list` as second element
    """
    uri = self._make_uri("content/locate")
    params = self._make_params(
        account, reference, path, cid=cid, content=content, version=version
    )
    resp, chunks = self._direct_request("GET", uri, params=params, **kwargs)
    # FIXME(FVE): see extract_content_headers_meta() code
    content_meta = extract_content_headers_meta(resp.headers)
    return content_meta, chunks


# Traceback (KeyError)
Checking object "account=AUTH_demo, container=testing, obj=magic"
Checking container "account=AUTH_demo, container=testing, obj=magic"
Checking account "account=AUTH_demo, container=testing, obj=magic"
Exception object "account=AUTH_demo, container=testing, obj=magic": ('reqid=None', 'Connection aborted.', HTTPException('got more than 100 headers',))
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/eventlet/greenpool.py", line 82, in _spawn_n_impl
func(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/oio/crawler/integrity.py", line 244, in check_obj
self.check_obj_policy(target.copy(), meta, results)
File "/usr/lib/python2.7/site-packages/oio/crawler/integrity.py", line 185, in check_obj_policy
stg_met = STORAGE_METHODS.load(obj_meta['chunk_method'])
KeyError: 'chunk_method'

Report
Accounts checked  : 1

Containers checked: 1

Objects checked   : 0
Exceptions        : 1

Chunks checked    : 0

# Fixed code
def content_locate(
    self,
    account=None,
    reference=None,
    path=None,
    cid=None,
    content=None,
    version=None,
    properties=True,
    **kwargs,
):
    """
    Get a description of the content along with the list of its chunks.

    :param cid: container id that can be used in place of `account`
        and `reference`
    :type cid: hexadecimal `str`
    :param content: content id that can be used in place of `path`
    :type content: hexadecimal `str`
    :param properties: should the request return object properties
        along with content description
    :type properties: `bool`
    :returns: a tuple with content metadata `dict` as first element
        and chunk `list` as second element
    """
    uri = self._make_uri("content/locate")
    params = self._make_params(
        account, reference, path, cid=cid, content=content, version=version
    )
    params["properties"] = properties
    try:
        resp, chunks = self._direct_request("GET", uri, params=params, **kwargs)
        content_meta = extract_content_headers_meta(resp.headers)
    except exceptions.OioNetworkException as exc:
        # TODO(FVE): this special behavior can be removed when
        # the 'content/locate' protocol is changed to include
        # object properties in the response body instead of headers.
        if properties and "got more than 100 headers" in str(exc):
            params["properties"] = False
            _resp, chunks = self._direct_request("GET", uri, params=params, **kwargs)
            content_meta = self.content_get_properties(
                account,
                reference,
                path,
                cid=cid,
                content=content,
                version=version,
                **kwargs,
            )
        else:
            raise
    return content_meta, chunks