anchor.diff:              elli_tcp:close(Socket),
               exit(normal);
           {ok, {http_response, _, _, _}, _} ->
  +            elli_tcp:close(Socket),
  +            exit(normal)
  +    end.
  +
  +recv_request(Socket, Buffer, Options, {Mod, Args} = _Callback) ->
  +    case elli_tcp:recv(Socket, 0, request_timeout(Options)) of
  +        {ok, Data} ->
  +            <<Buffer/binary, Data/binary>>;
  +        {error, timeout} ->
  +            handle_event(Mod, request_timeout, [], Args),
  +            elli_tcp:close(Socket),
  +            exit(normal);
  +        {error, Closed} when Closed =:= closed orelse
  +                             Closed =:= enotconn ->
  +            handle_event(Mod, request_closed, [], Args),
               elli_tcp:close(Socket),
               exit(normal)
       end.
  
positive.code: keepalive_loop(Socket, NumRequests, Buffer, Options, Callback) ->
      case ?MODULE:handle_request(Socket, Buffer, Options, Callback) of
          {keep_alive, NewBuffer} ->
              ?MODULE:keepalive_loop(Socket, NumRequests,
                                     NewBuffer, Options, Callback);
          {close, _} ->
              elli_tcp:close(Socket),
  
negative.code: %%
  
  %% @doc Retrieve the request line.
  get_request(Socket, <<>>, Options, Callback) ->
      NewBuffer = recv_request(Socket, <<>>, Options, Callback),
      get_request(Socket, NewBuffer, Options, Callback);
  get_request(Socket, Buffer, Options, Callback) ->
      t(request_start),
      get_request_(Socket, Buffer, Options, Callback).
  
  get_request_(Socket, Buffer, Options, {Mod, Args} = Callback) ->
      case erlang:decode_packet(http_bin, Buffer, []) of
          {more, _} ->
              recv_request(Socket, Buffer, Options, Callback);
          {ok, {http_request, Method, RawPath, Version}, Rest} ->
              {Method, RawPath, Version, Rest};
          {ok, {http_error, _}, _} ->
  