anchor.diff:  % Try authentication handlers in order until one sets a user_ctx
   % the auth funs also have the option of returning a response
   % move this to couch_httpd_auth?
  -authenticate_request(#httpd{user_ctx=#user_ctx{}} = Req, _AuthSrcs) ->
  +authenticate_request(#httpd{user_ctx=#user_ctx{}} = Req, _AuthHandlers) ->
       Req;
   authenticate_request(#httpd{} = Req, []) ->
       case couch_config:get("couch_httpd_auth", "require_valid_user", "false") of
  
positive.code: handle_request_int(MochiReq, DefaultFun,
              UrlHandlers, DbUrlHandlers, DesignUrlHandlers) ->
      Begin = now(),
      AuthenticationSrcs = make_fun_spec_strs(
              couch_config:get("httpd", "authentication_handlers")),
      % for the path, use the raw path with the query string and fragment
      % removed, but URL quoting left intact
      RawUri = MochiReq:get(raw_path),
  
negative.code:     "false" ->
          Req#httpd{user_ctx=#user_ctx{}}
      end;
  authenticate_request(#httpd{} = Req, [{AuthFun, AuthSrc} | RestAuthHandlers]) ->
      R = case AuthFun(Req) of
          #httpd{user_ctx=#user_ctx{}=UserCtx}=Req2 ->
              Req2#httpd{user_ctx=UserCtx#user_ctx{handler=AuthSrc}};
          Else -> Else
      end,
      authenticate_request(R, RestAuthHandlers);
  authenticate_request(Response, _AuthSrcs) ->
      Response.
  
  