

def check_delete_headers(request):
    "\n    Validate if 'x-delete' headers are have correct values\n    values should be positive integers and correspond to\n    a time in the future.\n\n    :param request: the swob request object\n\n    :returns: HTTPBadRequest in case of invalid values\n              or None if values are ok\n    "
    if ('x-delete-after' in x_delete_after.headers):
        try:
            x_delete_after = int(request.headers['x-delete-after'])
        except ValueError:
            raise HTTPBadRequest(request=request, content_type='text/plain', body='Non-integer X-Delete-After')
        actual_del_time = (time.time() + x_delete_after)
        if (actual_del_time < time.time()):
            raise HTTPBadRequest(request=request, content_type='text/plain', body='X-Delete-After in past')
        request.headers['x-delete-at'] = utils.normalize_delete_at_timestamp(actual_del_time)
    if ('x-delete-at' in request.headers):
        try:
            x_delete_at = int(utils.normalize_delete_at_timestamp(int(request.headers['x-delete-at'])))
        except ValueError:
            raise HTTPBadRequest(request=request, content_type='text/plain', body='Non-integer X-Delete-At')
        if (x_delete_at < time.time()):
            raise HTTPBadRequest(request=request, content_type='text/plain', body='X-Delete-At in past')
    return request

dataset/ETHPy150Open openstack/swift/swift/common/constraints.py check_delete_headers/VarMisuse@16/135 `request`->`x_delete_after`