From 861616aef36e0d05c3c8fe55478a5748d7f42388 Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Sun, 12 Sep 2010 11:36:46 +0000 Subject: Replicator bug fix: redirect from remote /db/_changes not properly handled (discarded user supplied HTTP Basic auth credentials) git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@996295 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_rep_changes_feed.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/couchdb') diff --git a/src/couchdb/couch_rep_changes_feed.erl b/src/couchdb/couch_rep_changes_feed.erl index 4c7dc35a..c67d4948 100644 --- a/src/couchdb/couch_rep_changes_feed.erl +++ b/src/couchdb/couch_rep_changes_feed.erl @@ -94,7 +94,7 @@ init([_Parent, #http_db{}=Source, Since, PostProps] = Args) -> {ok, #state{conn=Pid, last_seq=Since, reqid=ReqId, init_args=Args}}; {ibrowse_async_headers, ReqId, Code, Hdrs} when Code=="301"; Code=="302" -> catch ibrowse:stop_worker_process(Pid), - Url2 = mochiweb_headers:get_value("Location", mochiweb_headers:make(Hdrs)), + Url2 = couch_rep_httpc:redirect_url(Hdrs, Req#http_db.url), %% TODO use couch_httpc:request instead of start_http_request {Pid2, ReqId2} = start_http_request(Url2), receive {ibrowse_async_headers, ReqId2, "200", _} -> -- cgit v1.2.3