From 42439734d44a9cb0c689d1b8732d397789e339cd Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Mon, 24 Aug 2009 19:28:36 +0000 Subject: follow 302s in replication git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@807342 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_rep_httpc.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/couchdb/couch_rep_httpc.erl') 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}); -- cgit v1.2.3