couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r996292 - /couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl
Date Sun, 12 Sep 2010 11:31:11 GMT
Author: fdmanana
Date: Sun Sep 12 11:31:10 2010
New Revision: 996292

URL: http://svn.apache.org/viewvc?rev=996292&view=rev
Log:
Replicator bug fix: redirect from remote /db/_changes not properly handled (discarded user
supplied HTTP Basic auth credentials)

Modified:
    couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl

Modified: couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl?rev=996292&r1=996291&r2=996292&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl (original)
+++ couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl Sun Sep 12 11:31:10 2010
@@ -94,7 +94,7 @@ init([_Parent, #http_db{}=Source, Since,
         {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 = 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", _} ->



Mime
View raw message