anchor.diff:  
   
   -spec send_file(Socket::inet:socket(), RequestHeaders::headers(),
  -		Code::response_code(), Headers::headers(), Filename::file:filename(),
  -		Opts::proplists:proplist(), Callback::callback()) -> ok.
  +                Code::response_code(), Headers::headers(), Filename::file:filename(),
  +                Opts::proplists:proplist(), Callback::callback()) -> ok.
   
   %% @doc: Generates and sends a HTTP response to the client where the body
   %% is the contents of the given file. Supports single byte-range requests.
   send_file(Socket, RequestHeaders, Code, Headers, Filename, Opts, {Mod, Args}) ->
       Size = case proplists:get_value(size, Opts) of
  -	       undefined -> get_size(Filename);
  -	       Size0     -> Size0
  -	   end,
  +               undefined -> get_size(Filename);
  +               Size0     -> Size0
  +           end,
       Range = case proplists:get_value(range, Opts) of
  -		undefined -> get_range(RequestHeaders, Size);
  -		Range0    -> Range0
  -	    end,
  +                undefined -> get_range(RequestHeaders, Size);
  +                Range0    -> Range0
  +            end,
       Headers0 = set_range_and_length(Range, Size, Headers),
       %% Rewrite status code when a (in)valid range is present.
       Code0 = case Range of
  -		undefined -> Code;
  -		{_,_}     -> 206;
  -		invalid   -> 416
  -	    end,
  +                undefined -> Code;
  +                {_,_}     -> 206;
  +                invalid   -> 416
  +            end,
   
       ResponseHeaders = [<<"HTTP/1.1 ">>, status(Code0), <<"\r\n">>,
  -		       encode_headers(Headers0), <<"\r\n">>],
  +                       encode_headers(Headers0), <<"\r\n">>],
       case gen_tcp:send(Socket, ResponseHeaders) of
  -	ok ->
  -	    case send_file(Socket, Filename, Range) of
  -		{ok, _BytesSent} -> ok;
  -		{error, closed} ->
  -		    Mod:handle_event(client_closed, [before_response], Args),
  -		    ok;
  -		{error, invalid_range} ->
  -		    Mod:handle_event(requested_range_not_satisfiable, [], Args),
  -		    ok
  -	    end;
  -	{error, closed} ->
  -	    Mod:handle_event(client_closed, [before_response], Args),
  -	    ok
  +        ok ->
  +            case send_file(Socket, Filename, Range) of
  +                {ok, _BytesSent} -> ok;
  +                {error, closed} ->
  +                    Mod:handle_event(client_closed, [before_response], Args),
  +                    ok;
  +                {error, invalid_range} ->
  +                    Mod:handle_event(requested_range_not_satisfiable, [], Args),
  +                    ok
  +            end;
  +        {error, closed} ->
  +            Mod:handle_event(client_closed, [before_response], Args),
  +            ok
       end.
   
   send_file(Socket, Filename, {Offset, Bytes}) ->
       case file:open(Filename, [read, raw, binary]) of
  -	{ok, Fd} ->
  -	    Res = file:sendfile(Fd, Socket, Offset, Bytes, []),
  -	    file:close(Fd),
  -	    Res;
  -	{error, Reason} ->
  -	    {error, Reason}
  +        {ok, Fd} ->
  +            Res = file:sendfile(Fd, Socket, Offset, Bytes, []),
  +            file:close(Fd),
  +            Res;
  +        {error, Reason} ->
  +            {error, Reason}
       end;
   %% When range is undefined, set both offset and bytes to 0,
   %% which sends the entire file.
  
positive.code: parse_range(_, _) -> invalid.
  
  -spec set_content_range(Range::byte_range(), Size::non_neg_integer(),
  			Headers::headers()) -> headers().
  
  set_content_range(undefined, _, Headers) ->
      Headers;
  set_content_range(Range, Size, Headers) ->
      lists:keystore(<<"Content-Range">>, 1, Headers,
  		   {<<"Content-Range">>,
  		    [<<"bytes ">>, set_content_range_bytes(Range),
  		     <<"/">>, ?i2l(Size)]}).
  
  set_content_range_bytes({Offset, Length}) ->
      [?i2l(Offset), <<"-">>, ?i2l(Offset + Length - 1)];
  set_content_range_bytes(invalid) -> <<"*">>.
  
  -spec set_content_length(Range::byte_range(), Size::non_neg_integer(),
  			 Headers::headers()) -> headers().
  
  set_content_length({_, Length}, _, Headers) ->
      lists:keystore(<<"Content-Length">>, 1, Headers,
  		   {<<"Content-Length">>, Length});
  set_content_length(undefined, Size, Headers) ->
      set_content_length({0, Size}, Size, Headers);
  set_content_length(invalid, Size, Headers) ->
      set_content_length({0,0}, Size, Headers).
  
  -spec set_range_and_length(Range::byte_range(), Size::non_neg_integer(),
  			   Headers::headers()) -> headers().
  
  set_range_and_length(Range, Size, Headers) ->
      set_content_length(Range, Size, set_content_range(Range, Size, Headers)).
  
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;
  