'Just because a response shows that an object is a SLO manifest does not
mean that response\'s body contains the entire SLO manifest. If it
doesn\'t, we need to make a second request to actually get the whole
thing.
Note: this assumes that X-Static-Large-Object has already been found.'

def _need_to_refetch_manifest(self, req):

    if (req.method == 'HEAD'):
        return True
    response_status = int(self._response_status[:3])
    if ((req.if_match or req.if_none_match) and (not is_success(response_status))):
        return True
    if (req.range and (response_status in (206, 416))):
        content_range = ''
        for (header, value) in self._response_headers:
            if (header.lower() == 'content-range'):
                content_range = value
                break
        match = re.match('bytes    (\\d+)-(\\d+)/(\\d+)$', content_range)
        if (not match):
            return True
        (first_byte, last_byte, length) = [int(x) for x in match.groups()]
        got_everything = ((first_byte == 0) and (last_byte == (length - 1)))
        return (not got_everything)
    return False
