anchor.diff:      RawUri = MochiReq:get(raw_path),
       Customer = cloudant_util:customer_name(MochiReq:get_header_value("X-Cloudant-User"), MochiReq:get_header_value("Host")),
       Path = ?COUCH:db_path(RawUri, Customer),
  -
  -    HandlerKey =
  -    case mochiweb_util:partition(Path, "/") of
  -    {"", "", ""} ->
  -        <<"/">>; % Special case the root url handler
  -    {FirstPart, _, _} ->
  -        list_to_binary(FirstPart)
  -    end,
  +    {HandlerKey, _, _} = mochiweb_util:partition(Path, "/"),
  +
       LogForClosedSocket = io_lib:format("mochiweb_recv_error for ~s - ~p ~s", [
           MochiReq:get(peer),
           MochiReq:get(method),
  
positive.code: increment_method_stats(Method) ->
      couch_stats_collector:increment({httpd_request_methods, Method}).
  
  url_handlers() ->
      [
          {<<"/">>,               fun chttpd_misc:handle_welcome_req/1},
          {<<"favicon.ico">>,     fun chttpd_misc:handle_favicon_req/1},
          {<<"_utils">>,          fun chttpd_misc:handle_utils_dir_req/1},
          {<<"_all_dbs">>,        fun chttpd_misc:handle_all_dbs_req/1},
          {<<"_active_tasks">>,   fun chttpd_misc:handle_task_status_req/1},
          {<<"_config">>,         fun chttpd_misc:handle_config_req/1},
          {<<"_replicate">>,      fun chttpd_misc:handle_replicate_req/1},
          {<<"_uuids">>,          fun chttpd_misc:handle_uuids_req/1},
          {<<"_log">>,            fun chttpd_misc:handle_log_req/1},
          {<<"_sleep">>,          fun chttpd_misc:handle_sleep_req/1},
          {<<"_session">>,        fun chttpd_auth:handle_session_req/1},
          {<<"_user">>,           fun chttpd_auth:handle_user_req/1},
          {<<"_oauth">>,          fun chttpd_oauth:handle_oauth_req/1},
          {<<"_stats">>,          fun chttpd_stats:handle_stats_req/1},
          {<<"_restart">>,        fun showroom_http:handle_restart_req/1},
          {<<"_cloudant">>,       fun showroom_httpd_admin:handle_cloudant_req/1}
      ].
  
  db_url_handlers() ->
      [
  
negative.code:         design_url_handlers = design_url_handlers()
      },
  
      {ok, Resp} =
      try
          erase(cookie_auth_failed),
          case authenticate_request(HttpReq, AuthenticationFuns) of
          #httpd{} = Req ->
              HandlerFun = url_handler(HandlerKey),
              HandlerFun(cloudant_auth:authorize_request(Req));
          Response ->
              Response
  