anchor.diff:          kill_client(Pid)
       end;
   send_body_part({Pid, Window}, Bin, _Timeout) 
  -        when Window >= 0, is_binary(Bin) ->
  +        when Window > 0, is_binary(Bin), is_pid(Pid) ->
       Pid ! {body_part, self(), Bin},
       receive
           {ack, Pid} ->
  
positive.code: -behaviour(application).
  
  -export([request/4, request/5, request/6]).
  -export([send_body_part/3, send_trailers/3]).
  -export([start/2, stop/1]).
  
  -include("lhttpc_types.hrl").
  
negative.code:     after 0 ->
          {Pid, dec(Window)}
      end;
  send_body_part({Pid, Window}, http_eob, Timeout) 
          when is_pid(Pid) ->
      Pid ! {body_part, self(), http_eob},
      read_response({Pid, Window}, Timeout).
  
  -spec send_trailers({pid(), window_size()}, [{string() | string()}]) 
          -> result().
  send_trailers({Pid, Window}, Trailers) ->
          send_trailers({Pid, Window}, Trailers, infinity).
  
  -spec send_trailers({pid(), window_size()}, [{string() | string()}], 
          timeout()) -> result().
  send_trailers({Pid, Window}, Trailers, Timeout)
          when is_list(Trailers), is_pid(Pid) ->
      Pid ! {trailers, self(), Trailers},
      read_response({Pid, Window}, Timeout).
  
  