anchor.diff:              exit(normal)
       end.
   
  -headers(Socket, Request, Headers, Body) ->
  +headers(Socket, Request, Headers, _Body, ?MAX_HEADERS) ->
  +    %% Too many headers sent, bad request.
  +    inet:setopts(Socket, [{packet, raw}]),
  +    Req = mochiweb:new_request({Socket, Request,
  +                                lists:reverse(Headers)}),
  +    Req:respond({400, [], []}),
  +    gen_tcp:close(Socket),
  +    exit(normal);
  +headers(Socket, Request, Headers, Body, HeaderCount) ->
       case gen_tcp:recv(Socket, 0, ?IDLE_TIMEOUT) of
           {ok, http_eoh} ->
               inet:setopts(Socket, [{packet, raw}]),
  
positive.code:                     ?MODULE:loop(Socket, Body)
              end;
          {ok, {http_header, _, Name, _, Value}} ->
              headers(Socket, Request, [{Name, Value} | Headers], Body);
          _Other ->
              gen_tcp:close(Socket),
              exit(normal)
  
negative.code: 
  -define(IDLE_TIMEOUT, 30000).
  
  -define(MAX_HEADERS, 1000).
  -define(DEFAULTS, [{name, ?MODULE},
                     {port, 8888}]).
  
  