anchor.diff:  call_body(Body, Req) ->
       Body(Req).
   
  --spec handle_invalid_request(term()) -> no_return().
  -handle_invalid_request(Socket) ->
  -    handle_invalid_request(Socket, {'GET', {abs_path, "/"}, {0,9}}, []),
  -    exit(normal).
  +-spec handle_invalid_msg_request(term(), term()) -> no_return().
  +handle_invalid_msg_request(Msg, Socket) ->
  +    handle_invalid_msg_request(Msg, Socket, {'GET', {abs_path, "/"}, {0,9}}, []).
  +
  +-spec handle_invalid_msg_request(term(), term(), term(), term()) -> no_return().
  +handle_invalid_msg_request(Msg, Socket, Request, RevHeaders) ->
  +    case {Msg, r15b_workaround()} of
  +        {{tcp_error,_,emsgsize}, true} ->
  +            %% R15B02 returns this then closes the socket, so close and exit
  +            mochiweb_socket:close(Socket),
  +            exit(normal);
  +        _ ->
  +            handle_invalid_request(Socket, Request, RevHeaders)
  +    end.
   
   -spec handle_invalid_request(term(), term(), term()) -> no_return().
   handle_invalid_request(Socket, Request, RevHeaders) ->
  
positive.code:     ok = mochiweb_socket:setopts(Socket, [{packet, http}]),
      request(Socket, Body).
  
  -ifdef(gen_tcp_r15b_workaround).
  -define(R15B_GEN_TCP_FIX, {tcp_error,_,emsgsize} ->
                   % R15B02 returns this then closes the socket, so close and exit
                   mochiweb_socket:close(Socket),
                   exit(normal);
         ).
  -else.
  -define(R15B_GEN_TCP_FIX,).
  -endif.
  
  request(Socket, Body) ->
      ok = mochiweb_socket:setopts(Socket, [{active, once}]),
      receive
  
negative.code: -define(MAX_HEADERS, 1000).
  -define(DEFAULTS, [{name, ?MODULE},
                     {port, 8888}]).
  
  -ifdef(gen_tcp_r15b_workaround).
  r15b_workaround() -> true.
  -else.
  r15b_workaround() -> false.
  -endif.
  
  parse_options(Options) ->
      {loop, HttpLoop} = proplists:lookup(loop, Options),
  