Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 42551 invoked from network); 23 Aug 2010 18:00:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Aug 2010 18:00:16 -0000 Received: (qmail 67840 invoked by uid 500); 23 Aug 2010 18:00:16 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 67741 invoked by uid 500); 23 Aug 2010 18:00:16 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 67734 invoked by uid 99); 23 Aug 2010 18:00:16 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Aug 2010 18:00:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Aug 2010 17:59:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5821523889E0; Mon, 23 Aug 2010 17:58:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r988235 - in /couchdb/branches/0.11.x/src/couchdb: couch_rep_att.erl couch_rep_httpc.erl Date: Mon, 23 Aug 2010 17:58:40 -0000 To: commits@couchdb.apache.org From: fdmanana@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100823175840.5821523889E0@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: fdmanana Date: Mon Aug 23 17:58:39 2010 New Revision: 988235 URL: http://svn.apache.org/viewvc?rev=988235&view=rev Log: Merged revision 988233 from trunk: Replicator: fix authentication failure when replicating design documents that have attachments. Closes COUCHDB-868. Patch by Jason Smith, thanks. Modified: couchdb/branches/0.11.x/src/couchdb/couch_rep_att.erl couchdb/branches/0.11.x/src/couchdb/couch_rep_httpc.erl Modified: couchdb/branches/0.11.x/src/couchdb/couch_rep_att.erl URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/src/couchdb/couch_rep_att.erl?rev=988235&r1=988234&r2=988235&view=diff ============================================================================== --- couchdb/branches/0.11.x/src/couchdb/couch_rep_att.erl (original) +++ couchdb/branches/0.11.x/src/couchdb/couch_rep_att.erl Mon Aug 23 17:58:39 2010 @@ -106,7 +106,7 @@ validate_headers(_Req, 200, Headers) -> MochiHeaders = mochiweb_headers:make(Headers), {ok, mochiweb_headers:get_value("Content-Encoding", MochiHeaders)}; validate_headers(Req, Code, Headers) when Code > 299, Code < 400 -> - Url = mochiweb_headers:get_value("Location",mochiweb_headers:make(Headers)), + Url = couch_rep_httpc:redirect_url(Headers, Req#http_db.url), NewReq = couch_rep_httpc:redirected_request(Req, Url), {ibrowse_req_id, ReqId} = couch_rep_httpc:request(NewReq), receive {ibrowse_async_headers, ReqId, NewCode, NewHeaders} -> Modified: couchdb/branches/0.11.x/src/couchdb/couch_rep_httpc.erl URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/src/couchdb/couch_rep_httpc.erl?rev=988235&r1=988234&r2=988235&view=diff ============================================================================== --- couchdb/branches/0.11.x/src/couchdb/couch_rep_httpc.erl (original) +++ couchdb/branches/0.11.x/src/couchdb/couch_rep_httpc.erl Mon Aug 23 17:58:39 2010 @@ -15,7 +15,7 @@ -include("../ibrowse/ibrowse.hrl"). -export([db_exists/1, db_exists/2, full_url/1, request/1, redirected_request/2, - spawn_worker_process/1, spawn_link_worker_process/1]). + redirect_url/2, spawn_worker_process/1, spawn_link_worker_process/1]). request(#http_db{} = Req) -> do_request(Req).