anchor.diff:      end.
   
   -spec get_range(RequestHeaders::headers(),
  -		Size::non_neg_integer()) -> byte_range().
  +                Size::non_neg_integer()) -> byte_range().
   
   %% @doc: Parses the Range header from the request, if present,
   %% as defined in rfc2616-14.35.1. At the moment only
  
positive.code:     try Mod:handle(Req, Args) of
          {ok, Headers, {file, Filename}}       -> {file, 200, Headers, Filename, []};
          {ok, Headers, {file, Filename, Opts}} -> {file, 200, Headers, Filename, Opts};
  	{ok, Headers, Body}                   -> {response, 200, Headers, Body};
          {ok, Body}                            -> {response, 200, [], Body};
          {chunk, Headers}                      -> {chunk, Headers, <<"">>};
          {chunk, Headers, Initial}             -> {chunk, Headers, Initial};
          {HttpCode, Headers, {file, Filename}} -> {file, HttpCode, Headers, Filename};
          {HttpCode, Headers, {file, Filename, Opts}} ->
  	                                         {file, HttpCode, Headers, Filename, Opts};
          {HttpCode, Headers, Body}             -> {response, HttpCode, Headers, Body};
          {HttpCode, Body}                      -> {response, HttpCode, [], Body}
      catch
  
negative.code:     parse_range({erlang:max(Size - SuffixLength, 0), SuffixLength}, Size);
  parse_range(<<$b,$y,$t,$e,$s,$=, ByteRange/binary>>, Size) ->
      case binary:split(ByteRange, <<"-">>) of
          %% byte-range without last-byte-pos
          [FirstBytePosBin, <<>>] ->
              parse_range({?b2i(FirstBytePosBin), Size}, Size);
          %% full byte-range
          [FirstBytePosBin, LastBytePosBin] ->
              First = ?b2i(FirstBytePosBin),
              Last = ?b2i(LastBytePosBin),
              parse_range({First, Last - First + 1}, Size);
          _ -> invalid
      end;
  parse_range({Offset, Length}, Size)
    when Offset < 0; Offset >= Size; Length =< 0; Size =< 0 -> invalid;
  