diff options
author | Robert Newson <rnewson@apache.org> | 2012-11-08 15:32:14 +0000 |
---|---|---|
committer | Robert Newson <rnewson@apache.org> | 2012-11-08 15:32:14 +0000 |
commit | 0d50103cfd87ae4746b1fb2474d733eb1205ab02 (patch) | |
tree | 23e06b243fb9e67b9118a0a65fe3065bd4490392 | |
parent | b9af7ea506ac95034a91951f29e1f4249ef4317c (diff) | |
download | couchdb-0d50103cfd87ae4746b1fb2474d733eb1205ab02.tar.gz |
Allow any 2xx code to indicate success
-rw-r--r-- | src/couch_replicator/src/couch_replicator_httpc.erl | 4 |
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, |