anchor.diff:  
   
   send_req(HttpDb, Params1, Callback) ->
  -    put(STREAM_STATUS, init),
  +    put(?STREAM_STATUS, init),
       couch_stats:increment_counter([couch_replicator, requests]),
       Params2 = ?replace(Params1, qs,
           [{K, ?b2l(iolist_to_binary(V))} || {K, V} <- get_value(qs, Params1, [])]),
  
positive.code: % messages for the given ReqId on the floor since we're
  % no longer in the HTTP request.
  clean_mailbox({ibrowse_req_id, ReqId}) ->
      case get(STREAM_STATUS) of
          streaming ->
              ibrowse:stream_next(ReqId),
              receive
                  {ibrowse_async_response, ReqId, _} ->
                      clean_mailbox({ibrowse_req_id, ReqId});
                  {ibrowse_async_response_end, ReqId} ->
                      put(STREAM_STATUS, ended),
                      ok
              end;
          _ ->
              receive
                  {ibrowse_async_response, ReqId, _} ->
                      clean_mailbox({ibrowse_req_id, ReqId});
                  {ibrowse_async_response_end, ReqId} ->
                      put(STREAM_STATUS, ended),
                      ok
              end
      end;
  
negative.code:         ibrowse:stream_next(ReqId),
          {Data, fun() -> stream_data_self(HttpDb, Params, Worker, ReqId, Cb) end};
      {Data, ibrowse_async_response_end} ->
          put(?STREAM_STATUS, ended),
          {Data, fun() -> throw({maybe_retry_req, more_data_expected}) end}
      end.
  
  