anchor.diff:      Headers0 = set_range_and_length(Range, Size, Headers),
       %% Rewrite status code when a (in)valid range is present.
       Code0 = case Range of
  +                undefined when Size =:= 0, Code =:= 200 -> 204;
                   undefined -> Code;
                   {_,_}     -> 206;
                   invalid   -> 416
  
positive.code:         {error, Reason} ->
              {error, Reason}
      end;
  %% When range is undefined, set both offset and bytes to 0,
  %% which sends the entire file.
  %% (see file:sendfile/5 documentation)
  send_file(Socket, Filename, undefined) ->
      send_file(Socket, Filename, {0, 0});
  %% Don't send file when range is invalid.
  send_file(_, _, invalid) ->
      {error, invalid_range}.
  
  get_size(Filename) ->
  
negative.code:             ok
      end.
  
  %% Makes passing a length of 0 a no-op.
  %% The default behaviour of file:send_file/5 makes
  %% passing a length of 0 sending the complete file.
  send_file(_, _, _, {_, 0}) ->
      {ok, 0};
  send_file(Socket, Filename, _, {Offset, Bytes}) ->
      case file:open(Filename, [read, raw, binary]) of
          {ok, Fd} ->
              Res = file:sendfile(Fd, Socket, Offset, Bytes, []),
  