couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [27/27] git commit: Allow any 2xx code to indicate success
Date Thu, 06 Dec 2012 21:06:55 GMT
Allow any 2xx code to indicate success


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/0d50103c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/0d50103c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/0d50103c

Branch: refs/heads/1597-update-erlang-oauth-1-3-0
Commit: 0d50103cfd87ae4746b1fb2474d733eb1205ab02
Parents: b9af7ea
Author: Robert Newson <rnewson@apache.org>
Authored: Thu Nov 8 15:32:14 2012 +0000
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Nov 8 15:32:14 2012 +0000

----------------------------------------------------------------------
 .../src/couch_replicator_httpc.erl                 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/0d50103c/src/couch_replicator/src/couch_replicator_httpc.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator/src/couch_replicator_httpc.erl b/src/couch_replicator/src/couch_replicator_httpc.erl
index 8773383..9c23595 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,


Mime
View raw message