You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by fd...@apache.org on 2010/10/05 11:55:24 UTC
svn commit: r1004597 - in /couchdb/branches/new_replicator/src/couchdb:
couch_api_wrap.erl couch_api_wrap_httpc.erl
Author: fdmanana
Date: Tue Oct 5 09:55:23 2010
New Revision: 1004597
URL: http://svn.apache.org/viewvc?rev=1004597&view=rev
Log:
New replicator: removed obsolete code.
Modified:
couchdb/branches/new_replicator/src/couchdb/couch_api_wrap.erl
couchdb/branches/new_replicator/src/couchdb/couch_api_wrap_httpc.erl
Modified: couchdb/branches/new_replicator/src/couchdb/couch_api_wrap.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/new_replicator/src/couchdb/couch_api_wrap.erl?rev=1004597&r1=1004596&r2=1004597&view=diff
==============================================================================
--- couchdb/branches/new_replicator/src/couchdb/couch_api_wrap.erl (original)
+++ couchdb/branches/new_replicator/src/couchdb/couch_api_wrap.erl Tue Oct 5 09:55:23 2010
@@ -72,20 +72,19 @@ db_open(Db, Options) ->
db_open(Db, Options, false).
db_open(#httpdb{} = Db, _Options, Create) ->
- {ok, Db2} = httpdb_setup(Db),
case Create of
false ->
ok;
true ->
- send_req(Db2, [{method, put}], fun(_, _, _) -> ok end)
+ send_req(Db, [{method, put}], fun(_, _, _) -> ok end)
end,
- send_req(Db2, [{method, head}],
+ send_req(Db, [{method, head}],
fun(200, _, _) ->
- {ok, Db2};
+ {ok, Db};
(401, _, _) ->
throw({unauthorized, ?l2b(db_uri(Db))});
(_, _, _) ->
- throw({db_not_found, ?l2b(Db2#httpdb.url)})
+ throw({db_not_found, ?l2b(Db#httpdb.url)})
end);
db_open(DbName, Options, Create) ->
case Create of
Modified: couchdb/branches/new_replicator/src/couchdb/couch_api_wrap_httpc.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/new_replicator/src/couchdb/couch_api_wrap_httpc.erl?rev=1004597&r1=1004596&r2=1004597&view=diff
==============================================================================
--- couchdb/branches/new_replicator/src/couchdb/couch_api_wrap_httpc.erl (original)
+++ couchdb/branches/new_replicator/src/couchdb/couch_api_wrap_httpc.erl Tue Oct 5 09:55:23 2010
@@ -16,7 +16,6 @@
-include("couch_api_wrap.hrl").
-include("../ibrowse/ibrowse.hrl").
--export([httpdb_setup/1]).
-export([send_req/3]).
-import(couch_util, [
@@ -25,11 +24,6 @@
]).
-httpdb_setup(#httpdb{} = Db) ->
- % TODO: setup Ibrowse proxy options
- {ok, Db}.
-
-
send_req(#httpdb{headers = BaseHeaders} = HttpDb, Params, Callback) ->
Method = get_value(method, Params, get),
Headers1 = get_value(headers, Params, []),