def __call__(self, env, start_response):
        try:
            # /v1/a/c or /v1/a/c/o
            split_path(env['PATH_INFO'], 3, 4, True)
            is_container_or_object_req = True
        except __HOLE__:
            is_container_or_object_req = False

        headers = [('Content-Type', 'text/plain'),
                   ('Content-Length', str(sum(map(len, self.body))))]
        if is_container_or_object_req and self.policy_idx is not None:
            headers.append(('X-Backend-Storage-Policy-Index',
                           str(self.policy_idx)))

        start_response(self.response_str, headers)
        while env['wsgi.input'].read(5):
            pass
        return self.body
dataset/ETHPy150Open openstack/swift/test/unit/common/middleware/test_proxy_logging.py/FakeApp.__call__