anchor.diff:              erlang:error(Reason)
       end.
   
  -
  -send_chunked_body_part(_State, _Buffer, Window, 0) ->
  +reply_chunked_part(_State, _Buffer, Window, 0) ->
       Window;
  -send_chunked_body_part(State = #client_state{requester = Pid}, Buff, 0, Size) ->
  +reply_chunked_part(State = #client_state{requester = Pid}, Buff, 0, Size) ->
       receive
           {ack, Pid} ->
  -            send_chunked_body_part(State, Buff, 1, Size);
  +            reply_chunked_part(State, Buff, 1, Size);
           {'DOWN', _, process, Pid, _} ->
               exit(normal)
       end;
  -send_chunked_body_part(#client_state{requester = Pid}, Buffer, Window, _Size) ->
  +reply_chunked_part(#client_state{requester = Pid}, Buffer, Window, _Size) ->
       Pid ! {body_part, self(), list_to_binary(lists:reverse(Buffer))},
       receive
           {ack, Pid} ->  Window;
  
positive.code:     read_length(Hdrs, Ssl, Socket, ContentLength).
  
  read_partial_finite_body(State = #client_state{}, Hdrs, 0, _Window) ->
      send_end_of_body(State, [], Hdrs);
  read_partial_finite_body(State = #client_state{requester = To}, Hdrs,
          ContentLength, 0) ->
      receive
  
negative.code:             erlang:error(Reason)
      end.
  
  read_partial_chunked_body(State, Hdrs, Window, BufferSize, Buffer, 0) ->
      Socket = State#client_state.socket,
      Ssl = State#client_state.ssl,
      PartSize = State#client_state.part_size,
      case read_chunk_size(Socket, Ssl) of
          0 ->
              reply_chunked_part(State, Buffer, Window, BufferSize),
              {Trailers, NewHdrs} = read_trailers(Socket, Ssl, [], Hdrs),
              reply_end_of_body(State, Trailers, NewHdrs);
          ChunkSize when PartSize =:= infinity ->
              Chunk = read_chunk(Socket, Ssl, ChunkSize),
              NewWindow = reply_chunked_part(State, [Chunk | Buffer], Window,
                  not_empty),
              read_partial_chunked_body(State, Hdrs, NewWindow, 0, [], 0);
          ChunkSize when BufferSize + ChunkSize >= PartSize ->
              {Chunk, RemSize} = read_partial_chunk(Socket, Ssl,
                  PartSize - BufferSize, ChunkSize),
              NewWindow = reply_chunked_part(State, [Chunk | Buffer], Window,
                  not_empty),
              read_partial_chunked_body(State, Hdrs, NewWindow, 0, [], RemSize);
          ChunkSize ->
              Chunk = read_chunk(Socket, Ssl, ChunkSize),
              read_partial_chunked_body(State, Hdrs, Window,
                  BufferSize + ChunkSize, [Chunk | Buffer], 0)
      end;
  read_partial_chunked_body(State, Hdrs, Window, BufferSize, Buffer, RemSize) ->
      Socket = State#client_state.socket,
      Ssl = State#client_state.ssl,
      PartSize = State#client_state.part_size,
      if
          BufferSize + RemSize >= PartSize ->
              {Chunk, NewRemSize} =
                  read_partial_chunk(Socket, Ssl, PartSize - BufferSize, RemSize),
              NewWindow = reply_chunked_part(State, [Chunk | Buffer], Window,
                  not_empty),
              read_partial_chunked_body(State, Hdrs, NewWindow, 0, [],
                  NewRemSize);
          BufferSize + RemSize < PartSize ->
              Chunk = read_chunk(Socket, Ssl, RemSize),
              read_partial_chunked_body(State, Hdrs, Window, BufferSize + RemSize,
                  [Chunk | Buffer], 0)
      end.
  
  read_chunk_size(Socket, Ssl) ->
  