def __parse_request_range(range_header_text):
left = None<EOL>right = None<EOL>if not range_header_text:<EOL><INDENT>return left, right<EOL><DEDENT>range_header_text = range_header_text.strip()<EOL>if not range_header_text.startswith('<STR_LIT>'):<EOL><INDENT>return left, right<EOL><DEDENT>components = range_header_text.split("<STR_LIT:=>")<EOL>if len(components) != <NUM_LIT:2>:<EOL><INDENT>return left, right<EOL><DEDENT>components = components[<NUM_LIT:1>].split("<STR_LIT:->")<EOL>try:<EOL><INDENT>right = int(components[<NUM_LIT:1>])<EOL><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>left = int(components[<NUM_LIT:0>])<EOL><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>return left, right<EOL>
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