Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow any 2xx code to indicate success

  • Loading branch information...
commit 0d50103cfd87ae4746b1fb2474d733eb1205ab02 1 parent b9af7ea
@rnewson rnewson authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/couch_replicator/src/couch_replicator_httpc.erl
View
4 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,

0 comments on commit 0d50103

Please sign in to comment.
Something went wrong with that request. Please try again.