anchor.diff:      Chars;
   chunk_size(<<Char, Binary/binary>>, Chars) ->
       chunk_size(Binary, [Char | Chars]).
  +
  +read_partial_chunk(Socket, Ssl, ChunkSize, ChunkSize) ->
  +    {read_chunk(Socket, Ssl, ChunkSize), 0};
  +read_partial_chunk(Socket, Ssl, Size, ChunkSize) ->
  +    lhttpc_sock:setopts(Socket, [{packet, raw}], Ssl),
  +    case lhttpc_sock:recv(Socket, Size, Ssl) of
  +        {ok, Chunk} ->
  +            {Chunk, ChunkSize - Size};
  +        {error, Reason} ->
  +            erlang:error(Reason)
  +    end.
   
   read_chunk(Socket, Ssl, Size) ->
       lhttpc_sock:setopts(Socket, [{packet, raw}], Ssl),
  
positive.code:             erlang:error(Reason)
      end.
  
  read_partial_chunked_body(State) -> 
      ok. %%TODO
  
  read_chunked_body(Socket, Ssl, Hdrs, Chunks) ->
      lhttpc_sock:setopts(Socket, [{packet, line}], Ssl),
      case lhttpc_sock:recv(Socket, Ssl) of
          {ok, ChunkSizeExt} ->
              case chunk_size(ChunkSizeExt) of
                  0 ->
                      Body = list_to_binary(lists:reverse(Chunks)),
                      lhttpc_sock:setopts(Socket, [{packet, httph}], Ssl),
                      {Body, read_trailers(Socket, Ssl, Hdrs)};
                  Size ->
                      Chunk = read_chunk(Socket, Ssl, Size),
                      read_chunked_body(Socket, Ssl, Hdrs, [Chunk | Chunks])
              end;
          {error, Reason} ->
              erlang:error(Reason)
      end.
  
  chunk_size(Bin) ->
  
negative.code:             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;
  