'Handler for HTTP GET/HEAD requests.'

def GETorHEAD(self, req):

    ai = self.account_info(self.account_name, req)
    if (not ai[1]):
        if ('swift.authorize' in req.environ):
            aresp = req.environ['swift.authorize'](req)
            if aresp:
                return aresp
        return HTTPNotFound(request=req)
    part = self.app.container_ring.get_part(self.account_name, self.container_name)
    concurrency = (self.app.container_ring.replica_count if self.app.concurrent_gets else 1)
    node_iter = self.app.iter_nodes(self.app.container_ring, part)
    resp = self.GETorHEAD_base(req, _('Container'), node_iter, part, req.swift_entity_path, concurrency)
    resp.headers['X-Backend-Recheck-Container-Existence'] = str(self.app.recheck_container_existence)
    set_info_cache(self.app, req.environ, self.account_name, self.container_name, resp)
    if ('swift.authorize' in req.environ):
        req.acl = resp.headers.get('x-container-read')
        aresp = req.environ['swift.authorize'](req)
        if aresp:
            return aresp
    if (not req.environ.get('swift_owner', False)):
        for key in self.app.swift_owner_headers:
            if (key in resp.headers):
                del resp.headers[key]
    return resp
