anchor.diff:  		      State#state{keep_alive = KeepAlive}, Data);
   		false ->
   		    ?hcrv("next request", [{request, NextRequest}]),
  -		    Relaxed = 
  -			(NextRequest#request.settings)#http_options.relaxed,
  -		    MFA     = {httpc_response, parse, 
  -			       [State#state.max_header_size, Relaxed]}, 
  -		    NewState =
  -			State#state{request     = NextRequest,
  -				    keep_alive  = KeepAlive,
  -				    mfa         = MFA,
  -				    status_line = undefined,
  -				    headers     = undefined,
  -				    body        = undefined},
  -		    case Data of
  -			<<>> ->
  -			    activate_once(Session), 
  -			    {noreply, NewState};
  -			_ ->
  -			    %% If we already received some bytes of
  -			    %% the next response
  -			    handle_info({httpc_handler, dummy, Data}, 
  -					NewState) 
  +		    #request{address = Address} = NextRequest,
  +		    case httpc_request:send(Address, Session, NextRequest) of
  +			ok ->
  +			    receive_response(NextRequest,
  +					     Session, <<>>,
  +					     State#state{keep_alive = KeepAlive});
  +			{error, Reason} ->
  +			    {reply, {keep_alive_failed, Reason}, State}
   		    end
   	    end
       end.
   
  +handle_empty_queue(Session, ProfileName, TimeOut, State) ->
  +    %% The server may choose too terminate an idle pipline| keep_alive session
  +    %% in this case we want to receive the close message
  +    %% at once and not when trying to send the next
  +    %% request.
  +    activate_once(Session),
  +    %% If a pipline | keep_alive session has been idle for some time is not
  +    %% closed by the server, the client may want to close it.
  +    NewState = activate_queue_timeout(TimeOut, State),
  +    update_session(ProfileName, Session, #session.queue_length, 0),
  +    %% Note mfa will be initilized when a new request
  +    %% arrives.
  +    {noreply,
  +     NewState#state{request     = undefined,
  +		    mfa         = undefined,
  +		    status_line = undefined,
  +		    headers     = undefined,
  +		    body        = undefined
  +			   }
  +    }.
  +
  +receive_response(Request, Session, Data, State) ->
  +    NewState = init_wait_for_response_state(Request, State),
  +    gather_data(Data, Session, NewState).
  +
  +init_wait_for_response_state(Request, State) ->
  +    Relaxed =
  +	(Request#request.settings)#http_options.relaxed,
  +    MFA     = {httpc_response, parse,
  +	       [State#state.max_header_size, Relaxed]},
  +    State#state{request     = Request,
  +		mfa         = MFA,
  +		status_line = undefined,
  +		headers     = undefined,
  +		body        = undefined}.
  +
  +gather_data(<<>>, Session, State) ->
  +    activate_once(Session),
  +    {noreply, State};
  +gather_data(Data, _, State) ->
  +    %% If we already received some bytes of
  +    %% the next response
  +    handle_info({httpc_handler, dummy, Data}, State).
   
   case_insensitive_header(Str) when is_list(Str) ->
       http_util:to_lower(Str);
  
positive.code:                         Session#session{queue_length = 1,
                                          client_close = ClientClose},
                      httpc_manager:insert_session(NewSession, ProfileName),
                      Relaxed = 
                          (Request#request.settings)#http_options.relaxed, 
                      MFA = {httpc_response, parse, 
                             [State#state.max_header_size, Relaxed]}, 
                      NewTimers = Timers#timers{queue_timer = undefined}, 
                      ?hcrd("session created", []),
                      {reply, ok, NewState#state{request = Request,
                                                 session = NewSession,
                                                 mfa     = MFA,
                                                 timers  = NewTimers}}
              end;
          {error, Reason} ->
              ?hcri("failed sending request", [{reason, Reason}]),
              {reply, {pipeline_failed, Reason}, State}
      end;
  
  handle_call(#request{address = Addr} = Request, _, 
  
negative.code:                    session = #session{type = keep_alive} = Session,
                     timers  = Timers,
                     options = #options{proxy = Proxy} = _Options,
                     profile_name = ProfileName} = State0)
    when Status =/= undefined ->
      
      ?hcrv("new request on a keep-alive session", 
  