anchor.diff:        Callback  :: elli_handler:callback(),
         ConnToken :: {'keep_alive' | 'close', binary()}.
   handle_request(S, PrevB, Opts, {Mod, Args} = Callback) ->
  -    t(request_start),
       {Method, RawPath, V, B0} = get_request(S, PrevB, Opts, Callback),
       t(headers_start),
       {RequestHeaders, B1} = get_headers(S, V, B0, Opts, Callback),
  
positive.code: %%
  
  %% @doc Retrieve the request line.
  get_request(Socket, Buffer, Options, {Mod, Args} = Callback) ->
      case erlang:decode_packet(http_bin, Buffer, []) of
          {more, _} ->
              case elli_tcp:recv(Socket, 0, request_timeout(Options)) of
                  {ok, Data} ->
                      NewBuffer = <<Buffer/binary, Data/binary>>,
                      get_request(Socket, NewBuffer, Options, Callback);
                  {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;
          {ok, {http_request, Method, RawPath, Version}, Rest} ->
              {Method, RawPath, Version, Rest};
          {ok, {http_error, _}, _} ->
  
negative.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 + 1,
                                     NewBuffer, Options, Callback);
          {close, _} ->
              elli_tcp:close(Socket),
  