diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2009-08-28 13:05:48 +0000 |
---|---|---|
committer | Adam Kocoloski <kocolosk@apache.org> | 2009-08-28 13:05:48 +0000 |
commit | 69e03ccc8e6e39750943e298d633acb4650e56b7 (patch) | |
tree | cb7d7dd396a3b570a10b57aca66455b0633c4143 /src/couchdb/couch_rep.erl | |
parent | 53a20bd7ea70df880a7932e3399989275d2e61ef (diff) |
fix pattern matching bug in redirects for replication
if opening the DB returns 301, use the new URL for the rest of the replication
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@808876 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_rep.erl')
-rw-r--r-- | src/couchdb/couch_rep.erl | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl index 8805577e..fa4d33bd 100644 --- a/src/couchdb/couch_rep.erl +++ b/src/couchdb/couch_rep.erl @@ -416,10 +416,7 @@ open_db({Props}, _UserCtx) -> auth = AuthProps, headers = lists:ukeymerge(1, Headers, DefaultHeaders) }, - case couch_rep_httpc:db_exists(Db) of - true -> Db; - false -> throw({db_not_found, ?l2b(Url)}) - end; + couch_rep_httpc:db_exists(Db); open_db(<<"http://",_/binary>>=Url, _) -> open_db({[{<<"url">>,Url}]}, []); open_db(<<"https://",_/binary>>=Url, _) -> |