def __parse_request_range(range_header_text):
    """ Return a tuple describing the byte range requested in a GET request
    If the range is open ended on the left or right side, then a value of None
    will be set.
    RFC7233: http://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7233.html#header.range
    Examples:
      Range : bytes=1024-
      Range : bytes=10-20
      Range : bytes=-999
    """
    left = None
    right = None
    if not range_header_text:
        return left, right
    range_header_text = range_header_text.strip()
    if not range_header_text.startswith('bytes'):
        return left, right
    components = range_header_text.split('=')
    if len(components) != 2:
        return left, right
    components = components[1].split('-')
    try:
        right = int(components[1])
    except:
        pass
    try:
        left = int(components[0])
    except:
        pass
    return left, right
