summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-08-24 19:32:51 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-08-24 19:32:51 +0000
commitb6975afe3d132f2d66553807abd3a66017ec9912 (patch)
treedf9611167d338576c93a4347a820fa7bd4d19b86
parent42439734d44a9cb0c689d1b8732d397789e339cd (diff)
also follow 302 for _changes feed
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@807345 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/couchdb/couch_rep_changes_feed.erl2
1 files changed, 1 insertions, 1 deletions
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