Skip to content

Commit

Permalink
make sure we use db options before passing the request.
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitc committed Apr 27, 2011
1 parent 53f6d3d commit b4d5f9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/couchbeam.erl
Expand Up @@ -324,7 +324,9 @@ open_or_create_db(Server, DbName, Options) ->
%% @spec open_or_create_db(server(), string(), list(), list()) -> {ok, db()|{error, Error}}
open_or_create_db(#server{options=IbrowseOpts}=Server, DbName, Options, Params) ->
Url = make_url(Server, DbName, []),
case request(get, Url, ["200"], IbrowseOpts) of
IbrowseOpts1 = couchbeam_util:propmerge1(Options, IbrowseOpts),
io:format("options ~p~n", [IbrowseOpts1]),
case request(get, Url, ["200"], IbrowseOpts1) of
{ok, _, _, _} ->
open_db(Server, DbName, Options);
{error, {ok, "404", _, _}} ->
Expand Down

0 comments on commit b4d5f9c

Please sign in to comment.