anchor.diff:              erlang:error(Reason)
       end.
   
  +read_trailers(Socket, Ssl, Trailers, Hdrs) ->
  +    lhttpc_sock:setopts(Socket, [{packet, httph}], Ssl),
  +    case lhttpc_sock:recv(Socket, Ssl) of
  +        {ok, http_eoh} ->
  +            {Trailers, Hdrs};
  +        {ok, {http_header, _, Name, _, Value}} ->
  +            Header = {lhttpc_lib:maybe_atom_to_list(Name), Value},
  +            read_trailers(Socket, Ssl, [Header | Trailers], [Header | Hdrs]);
  +        {error, {http_error, Data}} ->
  +            erlang:error({bad_trailer, Data})
  +    end.
  +    
   read_trailers(Socket, Ssl, Hdrs) ->
  +    lhttpc_sock:setopts(Socket, [{packet, httph}], Ssl),
       case lhttpc_sock:recv(Socket, Ssl) of
           {ok, http_eoh} ->
               Hdrs;
  
positive.code:     Chars;
  chunk_size(<<Char, Binary/binary>>, Chars) ->
      chunk_size(Binary, [Char | Chars]).
  
  read_chunk(Socket, Ssl, Size) ->
      lhttpc_sock:setopts(Socket, [{packet, raw}], Ssl),
  
negative.code:             {fixed_length, list_to_integer(ContentLength)}
      end.
  
  read_partial_body(State, _Vsn, Hdrs, chunked) ->
      read_partial_chunked_body(State, Hdrs, State#client_state.download_window, 
          0, [], 0);
  read_partial_body(State, Vsn, Hdrs, infinite) ->
      check_infinite_response(Vsn, Hdrs),
      read_partial_infinite_body(State, Hdrs, State#client_state.download_window);
  