

def parse_if_range_header(value):
    'Parses an if-range header which can be an etag or a date.  Returns\n    a :class:`~werkzeug.datastructures.IfRange` object.\n\n    .. versionadded:: 0.7\n    '
    if (not value):
        return IfRange()
    date = parse_date(value)
    if (date is not None):
        return IfRange(date=date)
    return IfRange(unquote_etag(value)[0])

dataset/ETHPy150Open Eforcers/gae-flask-todo/lib/werkzeug/http.py parse_if_range_header/original