anchor.diff:      {ok, SocketOptions} = couch_util:parse_term(
           couch_config:get("httpd", "socket_options", "[]")),
   
  +    set_auth_handlers(),
  +
       Loop = fun(Req)->
           case SocketOptions of
           [] ->
  
positive.code:     "false" ->
          Req#httpd{user_ctx=#user_ctx{}}
      end;
  authenticate_request(#httpd{} = Req, [AuthSrc|Rest]) ->
      AuthFun = make_arity_1_fun(AuthSrc),
      R = case AuthFun(Req) of
          #httpd{user_ctx=#user_ctx{}=UserCtx}=Req2 ->
              Req2#httpd{user_ctx=UserCtx#user_ctx{handler=?l2b(AuthSrc)}};
          Else -> Else
      end,
      authenticate_request(R, Rest);
  authenticate_request(Response, _AuthSrcs) ->
      Response.
  
  
negative.code: % 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, _AuthHandlers) ->
      Req;
  authenticate_request(#httpd{} = Req, []) ->
      case couch_config:get("couch_httpd_auth", "require_valid_user", "false") of
  