From b6975afe3d132f2d66553807abd3a66017ec9912 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Mon, 24 Aug 2009 19:32:51 +0000 Subject: also follow 302 for _changes feed git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@807345 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_rep_changes_feed.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/couchdb/couch_rep_changes_feed.erl b/src/couchdb/couch_rep_changes_feed.erl index a358bed5..1b6148a5 100644 --- a/src/couchdb/couch_rep_changes_feed.erl +++ b/src/couchdb/couch_rep_changes_feed.erl @@ -67,7 +67,7 @@ init([_Parent, #http_db{}=Source, Since, PostProps]) -> {ibrowse_async_headers, ReqId, "200", _} -> ibrowse:stream_next(ReqId), {ok, #state{conn=Pid, last_seq=Since, reqid=ReqId}}; - {ibrowse_async_headers, ReqId, "301", Hdrs} -> + {ibrowse_async_headers, ReqId, Code, Hdrs} when Code=="301"; Code=="302" -> catch ibrowse:stop_worker_process(Pid), Url2 = mochiweb_headers:get_value("Location", mochiweb_headers:make(Hdrs)), %% TODO use couch_httpc:request instead of start_http_request -- cgit v1.2.3