in function/python_3_9/src/response/range_mapper.py [0:0]
def validate_range_str(range_str):
"""
Validate the range request string
:param range_str: Range request string
:return: A boolean value whether if range string is valid
"""
ranges = split_range_str(range_str)
if ranges is None:
return False
unit, start, end = ranges
if unit.lower() != 'bytes':
return False
if start is None and end is None:
return False
if start and start < 0:
return False
if start and end and start > end:
return False
return True