summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-08-24 19:28:36 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-08-24 19:28:36 +0000
commit42439734d44a9cb0c689d1b8732d397789e339cd (patch)
tree657148533c54c4a1d7747bdde6d7b77dd52440f7 /src
parentc9fb739f5ef9f0cde632788ce7a007f6b5c54564 (diff)
follow 302s in replication
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@807342 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_rep_httpc.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_rep_httpc.erl b/src/couchdb/couch_rep_httpc.erl
index 3d0696e4..4ebbcefc 100644
--- a/src/couchdb/couch_rep_httpc.erl
+++ b/src/couchdb/couch_rep_httpc.erl
@@ -92,7 +92,7 @@ process_response({ok, Status, Headers, Body}, Req) ->
Code = list_to_integer(Status),
if Code =:= 200; Code =:= 201 ->
?JSON_DECODE(maybe_decompress(Headers, Body));
- Code =:= 301 ->
+ Code =:= 301; Code =:= 302 ->
MochiHeaders = mochiweb_headers:make(Headers),
RedirectUrl = mochiweb_headers:get_value("Location", MochiHeaders),
do_request(Req#http_db{url = RedirectUrl});