diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-08-23 17:55:15 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-08-23 17:55:15 +0000 |
commit | 059e5f4d9979e9fcc31dc8671f8744e2af8fe7c0 (patch) | |
tree | ba5345a77ce56dd4d0abbff82dd85be65d6c7a15 /src/couchdb/couch_rep_att.erl | |
parent | 526d6aec9361fe725716b104490f7b9ba013498c (diff) |
Replicator: fix authentication failure when replicating design documents that have attachments.
Closes COUCHDB-868.
Patch by Jason Smith, thanks.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@988233 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_rep_att.erl')
-rw-r--r-- | src/couchdb/couch_rep_att.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_rep_att.erl b/src/couchdb/couch_rep_att.erl index 28b8945c..3c09b90a 100644 --- a/src/couchdb/couch_rep_att.erl +++ b/src/couchdb/couch_rep_att.erl @@ -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} -> |