anchor.diff:      end.
   
   maybe_access_log(Ip, Req, H) ->
  +    GC=get(gc),
       SC=get(sc),
       case ?sc_has_access_log(SC) of
           true ->
  +            HName = case ?gc_log_has_resolve_hostname(GC) of
  +                        true when Ip =/= unknown ->
  +                            case inet:gethostbyaddr(Ip) of
  +                                {ok, HE} -> HE#hostent.h_name;
  +                                _        -> Ip
  +                            end;
  +                        _ ->
  +                            Ip
  +                    end,
               Time = timer:now_diff(now(), get(request_start_time)),
  -            yaws_log:accesslog(SC, Ip, Req, H, get(outh), Time);
  +            yaws_log:accesslog(SC, HName, Req, H, get(outh), Time);
           false ->
               ignore
       end.
  
positive.code:                   end
            end,
      ?Debug("Request data = ~s~n", [binary_to_list(un_partial(Bin))]),
      ARG = make_arg(CliSock, Head, Req, Bin),
      handle_request(CliSock, ARG, size(un_partial(Bin))).
  
  
  'MKCOL'(CliSock, Req, Head) ->
      no_body_method(CliSock, Req, Head).
  
  no_body_method(CliSock, Req, Head) ->
      SC=get(sc),
      ok = yaws:setopts(CliSock, [{packet, raw}, binary], yaws:is_ssl(SC)),
      flush(CliSock, Head#headers.content_length),
      ARG = make_arg(CliSock, Head, Req, undefined),
      handle_request(CliSock, ARG, 0).
  
  
  make_arg(CliSock, Head, Req, Bin) ->
      SC = get(sc),
      IP = if
               is_port(CliSock) ->
                   case inet:peername(CliSock) of
                       {ok, IpPort} ->
                           IpPort;
                       _ ->
                           {unknown, unknown}
                   end;
               true ->
                   case ssl:peername(CliSock) of
                       {ok, IpPort} ->
                           IpPort;
                       _ ->
                           {unknown, unknown}
                   end
           end,
      ARG = #arg{clisock = CliSock,
                 client_ip_port = IP,
                 headers = Head,
                 req = Req,
                 opaque = SC#sconf.opaque,
  
negative.code:     Bin.
  
  
  call_method(Method, CliSock, IPPort, Req, H) ->
      case Method of
          F when is_atom(F) ->
              ?MODULE:F(CliSock, IPPort, Req, H);
          L when is_list(L) ->
              handle_extension_method(L, CliSock, IPPort, Req, H)
      end.
  
  
  'HEAD'(CliSock, IPPort, Req, Head) ->
      put(acc_content, discard),
      no_body_method(CliSock, IPPort, Req, Head).
  
  not_implemented(CliSock, _IPPort, Req, Head) ->
      SC=get(sc),
      ok = yaws:setopts(CliSock, [{packet, raw}, binary], yaws:is_ssl(SC)),
      flush(CliSock, Head#headers.content_length),
      deliver_501(CliSock, Req).
  
  
  'TRACE'(CliSock, IPPort, Req, Head) ->
      not_implemented(CliSock, IPPort, Req, Head).
  
  'OPTIONS'(CliSock, IPPort, Req, Head) ->
      case Req#http_request.path of
          '*' ->
              % Handle "*" as per RFC2616 section 5.1.2
              deliver_options(CliSock, Req, ['GET', 'HEAD', 'OPTIONS',
                                             'PUT', 'POST', 'DELETE']);
          _ ->
              no_body_method(CliSock, IPPort, Req, Head)
      end.
  
  'PUT'(CliSock, IPPort, Req, Head) ->
      ?Debug("PUT Req=~p~n H=~p~n", [?format_record(Req, http_request),
                                     ?format_record(Head, headers)]),
      body_method(CliSock, IPPort, Req, Head).
  
  
  'DELETE'(CliSock, IPPort, Req, Head) ->
      no_body_method(CliSock, IPPort, Req, Head).
  
  'PATCH'(CliSock, IPPort, Req, Head) ->
      ?Debug("PATCH Req=~p~n H=~p~n", [?format_record(Req, http_request),
                                       ?format_record(Head, headers)]),
      body_method(CliSock, IPPort, Req, Head).
  
  %%%
  %%% WebDav specifics: PROPFIND, MKCOL,....
  %%%
  'PROPFIND'(CliSock, IPPort, Req, Head) ->
      %%?elog("PROPFIND Req=~p H=~p~n",
      %%                   [?format_record(Req, http_request),
      %%                    ?format_record(Head, headers)]),
      body_method(CliSock, IPPort, Req, Head).
  
  'MOVE'(CliSock, IPPort, Req, Head) ->
      no_body_method(CliSock, IPPort, Req, Head).
  
  'COPY'(CliSock, IPPort, Req, Head) ->
      no_body_method(CliSock, IPPort, Req, Head).
  
  
  body_method(CliSock, IPPort, Req, Head) ->
      SC=get(sc),
      ok = yaws:setopts(CliSock, [{packet, raw}, binary], yaws:is_ssl(SC)),
      PPS = SC#sconf.partial_post_size,
  