diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-10-16 18:25:12 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-10-16 18:25:12 +0000 |
commit | e0b39b55f581867327728f8e0af470144c77915a (patch) | |
tree | 6a647aee586f0917f31d15ac891f9d0fc92cb0a7 /src/couchdb/couch_rep_att.erl | |
parent | ec69a1b7916b8952fb8bcc8f054654d5681a9457 (diff) |
Replicator: deal with 303 HTTP redirects. Closes COUCHDB-918.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1023345 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_rep_att.erl')
-rw-r--r-- | src/couchdb/couch_rep_att.erl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/couchdb/couch_rep_att.erl b/src/couchdb/couch_rep_att.erl index 3c09b90a..6bb993a8 100644 --- a/src/couchdb/couch_rep_att.erl +++ b/src/couchdb/couch_rep_att.erl @@ -106,8 +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 = couch_rep_httpc:redirect_url(Headers, Req#http_db.url), - NewReq = couch_rep_httpc:redirected_request(Req, Url), + NewReq = couch_rep_httpc:redirected_request(Code, Headers, Req), {ibrowse_req_id, ReqId} = couch_rep_httpc:request(NewReq), receive {ibrowse_async_headers, ReqId, NewCode, NewHeaders} -> {ok, Encoding} = validate_headers(NewReq, list_to_integer(NewCode), |