anchor.diff:  stop(Server) ->
       gen_server:call(Server, stop).
   
  -init([_Parent, #http_db{}=Source, Since, PostProps] = Args) ->
  +init([Parent, #http_db{}=Source, Since, PostProps]) ->
       process_flag(trap_exit, true),
       Feed = case couch_util:get_value(<<"continuous">>, PostProps, false) of
       false ->
  
positive.code: handle_headers(200, _, State) ->
      maybe_stream_next(State),
      {noreply, State};
  handle_headers(301, Hdrs, #state{init_args = InitArgs} = State) ->
      catch ibrowse:stop_worker_process(State#state.conn),
      [_, #http_db{url = Url1} | _] = InitArgs,
      Url = couch_rep_httpc:redirect_url(Hdrs, Url1),
      %% TODO use couch_httpc:request instead of start_http_request
      {Pid, ReqId} = start_http_request(Url),
      {noreply, State#state{conn=Pid, reqid=ReqId}};
  handle_headers(Code, Hdrs, State) ->
      ?LOG_ERROR("replicator changes feed failed with code ~s and Headers ~n~p",
          [Code,Hdrs]),
  
negative.code:     {ibrowse_async_headers, ReqId, Code, Hdrs} when Code=="301"; Code=="302" ->
          catch ibrowse:stop_worker_process(Pid),
          Url2 = couch_rep_httpc:redirect_url(Hdrs, Req#http_db.url),
          Req2 = couch_rep_httpc:redirected_request(Req, Url2),
          Pid2 = couch_rep_httpc:spawn_link_worker_process(Req2),
          Req3 = Req2#http_db{conn = Pid2},
          {ibrowse_req_id, ReqId2} = couch_rep_httpc:request(Req3),
          Args2 = [Parent, Req3, Since, PostProps],
          receive {ibrowse_async_headers, ReqId2, "200", _} ->
              {ok, #state{conn=Pid2, last_seq=Since, reqid=ReqId2, init_args=Args2}}
          after 30000 ->
              {stop, changes_timeout}
          end;
  