anchor.diff:          ?assertEqual(
               "http://example.com",
               proplists:get_value("Access-Control-Allow-Origin", Resp)),
  -        ?assertEqual(
  -            "Cache-Control, Content-Type, Server",
  -            proplists:get_value("Access-Control-Expose-Headers", Resp))
  +        ?assertEqualLists(
  +            ?COUCH_HEADERS ++ list_simple_headers(Resp),
  +            split_list(proplists:get_value("Access-Control-Expose-Headers", Resp)))
       end).
   
   should_make_preflight_request(_, {_, _, Url, DefaultHeaders}) ->
  -    ?_assertEqual(?SUPPORTED_METHODS,
  +    ?_assertEqualLists(?SUPPORTED_METHODS,
           begin
               Headers = DefaultHeaders
                         ++ [{"Access-Control-Request-Method", "GET"}],
               {ok, _, Resp, _} = test_request:options(Url, Headers),
  -            proplists:get_value("Access-Control-Allow-Methods", Resp)
  +            split_list(proplists:get_value("Access-Control-Allow-Methods", Resp))
           end).
   
   should_make_prefligh_request_with_port({_, VHost}, {_, _, Url, _}) ->
  
positive.code: -include_lib("couch/include/couch_eunit.hrl").
  -include_lib("couch/include/couch_db.hrl").
  
  
  -define(SUPPORTED_METHODS,
          "GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT, COPY, OPTIONS").
  -define(TIMEOUT, 1000).
  
  
  start() ->
      Ctx = test_util:start_couch([ioq]),
  
negative.code:             {ok, _, Resp, _} = test_request:options(
                  Url, Headers, [{basic_auth, {"test", "test"}}]),
              config:delete("admins", "test", false),
              split_list(proplists:get_value("Access-Control-Allow-Methods", Resp))
          end).
  
  should_not_return_cors_headers_for_invalid_origin({Host, _}) ->
  