summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2012-11-08 15:32:14 +0000
committerRobert Newson <rnewson@apache.org>2012-11-08 15:32:14 +0000
commit0d50103cfd87ae4746b1fb2474d733eb1205ab02 (patch)
tree23e06b243fb9e67b9118a0a65fe3065bd4490392
parentb9af7ea506ac95034a91951f29e1f4249ef4317c (diff)
downloadcouchdb-0d50103cfd87ae4746b1fb2474d733eb1205ab02.tar.gz
Allow any 2xx code to indicate success
-rw-r--r--src/couch_replicator/src/couch_replicator_httpc.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couch_replicator/src/couch_replicator_httpc.erl b/src/couch_replicator/src/couch_replicator_httpc.erl
index 8773383c3..9c235958b 100644
--- a/src/couch_replicator/src/couch_replicator_httpc.erl
+++ b/src/couch_replicator/src/couch_replicator_httpc.erl
@@ -80,7 +80,7 @@ process_response({ibrowse_req_id, ReqId}, Worker, HttpDb, Params, Callback) ->
process_response({ok, Code, Headers, Body}, Worker, HttpDb, Params, Callback) ->
release_worker(Worker, HttpDb),
case list_to_integer(Code) of
- Ok when Ok =:= 200 ; Ok =:= 201 ; (Ok >= 400 andalso Ok < 500) ->
+ Ok when (Ok >= 200 andalso Ok < 300) ; (Ok >= 400 andalso Ok < 500) ->
EJson = case Body of
<<>> ->
null;
@@ -102,7 +102,7 @@ process_stream_response(ReqId, Worker, HttpDb, Params, Callback) ->
receive
{ibrowse_async_headers, ReqId, Code, Headers} ->
case list_to_integer(Code) of
- Ok when Ok =:= 200 ; Ok =:= 201 ; (Ok >= 400 andalso Ok < 500) ->
+ Ok when (Ok >= 200 andalso Ok < 300) ; (Ok >= 400 andalso Ok < 500) ->
StreamDataFun = fun() ->
stream_data_self(HttpDb, Params, Worker, ReqId, Callback)
end,