diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-09-13 10:57:44 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-09-13 10:57:44 +0000 |
commit | a8d6024454601d1a579e50f10631c5d13b22ef34 (patch) | |
tree | a924518987d8983798ba4e1e5c763c0d327a2daf /src/couchdb/couch_rep.erl | |
parent | d70f2b570b1402226cb6bf1bf7e53e1e71564679 (diff) |
Replicator changes:
1) avoid badmatch exceptions when there's a failure opening a single document from a remote source;
2) add error log messages describing which remote documents couldn't be opened and why;
3) when replications errors can't be encoded as json, convert and send them as json strings
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@996492 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_rep.erl')
-rw-r--r-- | src/couchdb/couch_rep.erl | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl index 57b30088..92142b77 100644 --- a/src/couchdb/couch_rep.erl +++ b/src/couchdb/couch_rep.erl @@ -377,16 +377,10 @@ close_db(Db) -> couch_db:close(Db). dbname(#http_db{url = Url}) -> - strip_password(Url); + couch_util:url_strip_password(Url); dbname(#db{name = Name}) -> Name. -strip_password(Url) -> - re:replace(Url, - "http(s)?://([^:]+):[^@]+@(.*)$", - "http\\1://\\2:*****@\\3", - [{return, list}]). - dbinfo(#http_db{} = Db) -> {DbProps} = couch_rep_httpc:request(Db), [{list_to_existing_atom(?b2l(K)), V} || {K,V} <- DbProps]; |