'Handle HTTP GET requests for the Swift Object Server.'

@public
@timing_stats()
def GET(self, request):

    (device, partition, account, container, obj, policy) = get_name_and_placement(request, 5, 5, True)
    frag_prefs = safe_json_loads(request.headers.get('X-Backend-Fragment-Preferences'))
    try:
        disk_file = self.get_diskfile(device, partition, account, container, obj, policy=policy, frag_prefs=frag_prefs)
    except DiskFileDeviceUnavailable:
        return HTTPInsufficientStorage(drive=device, request=request)
    try:
        with disk_file.open():
            metadata = disk_file.get_metadata()
            obj_size = int(metadata['Content-Length'])
            file_x_ts = Timestamp(metadata['X-Timestamp'])
            keep_cache = (self.keep_cache_private or (('X-Auth-Token' not in request.headers) and ('X-Storage-Token' not in request.headers)))
            conditional_etag = resolve_etag_is_at_header(request, metadata)
            response = Response(app_iter=disk_file.reader(keep_cache=keep_cache), request=request, conditional_response=True, conditional_etag=conditional_etag)
            response.headers['Content-Type'] = metadata.get('Content-Type', 'application/octet-stream')
            for (key, value) in metadata.items():
                if (is_sys_or_user_meta('object', key) or is_object_transient_sysmeta(key) or (key.lower() in self.allowed_headers)):
                    response.headers[key] = value
            response.etag = metadata['ETag']
            response.last_modified = math.ceil(float(file_x_ts))
            response.content_length = obj_size
            try:
                response.content_encoding = metadata['Content-Encoding']
            except KeyError:
                pass
            response.headers['X-Timestamp'] = file_x_ts.normal
            response.headers['X-Backend-Timestamp'] = file_x_ts.internal
            response.headers['X-Backend-Data-Timestamp'] = disk_file.data_timestamp.internal
            if disk_file.durable_timestamp:
                response.headers['X-Backend-Durable-Timestamp'] = disk_file.durable_timestamp.internal
            response.headers['X-Backend-Fragments'] = _make_backend_fragments_header(disk_file.fragments)
            resp = request.get_response(response)
    except DiskFileXattrNotSupported:
        return HTTPInsufficientStorage(drive=device, request=request)
    except (DiskFileNotExist, DiskFileQuarantined) as e:
        headers = {}
        if hasattr(e, 'timestamp'):
            headers['X-Backend-Timestamp'] = e.timestamp.internal
        resp = HTTPNotFound(request=request, headers=headers, conditional_response=True)
    return resp
