anchor.diff:              Ret;
           {'DOWN', Ref, process, Pid, {{nocatch, {missing_stub,_} = Stub}, _}} ->
               throw(Stub);
  +        {'DOWN', Ref, process, Pid, request_uri_too_long} ->
  +            NewMaxLen = get_value(max_url_len, Options, ?MAX_URL_LEN) div 2,
  +            case NewMaxLen < ?MIN_URL_LEN of
  +                true ->
  +                    throw(request_uri_too_long);
  +                false ->
  +                    ?LOG_INFO("Reducing url length to ~B because of 414 response", [NewMaxLen]),
  +                    Options1 = lists:keystore(max_url_len, 1, Options,
  +                                              {max_url_len, NewMaxLen}),
  +                    open_doc_revs(HttpDb, Id, Revs, Options1, Fun, Acc)
  +            end;
           {'DOWN', Ref, process, Pid, Else} ->
               Url = couch_util:url_strip_password(
                   couch_replicator_httpc:full_url(HttpDb, [{path,Path}, {qs,QS}])
  
positive.code:     ]).
  
  -define(MAX_WAIT, 5 * 60 * 1000).
  
  db_uri(#httpdb{url = Url}) ->
      couch_util:url_strip_password(Url);
  
negative.code:     ]}.
  
  
  options_to_query_args(HttpDb, Path, Options0) ->
      case lists:keytake(max_url_len, 1, Options0) of
          false -> MaxLen = ?MAX_URL_LEN, Options = Options0;
          {value, {max_url_len, MaxLen}, Options} -> ok
      end,
      case lists:keytake(atts_since, 1, Options) of
      false ->
          options_to_query_args(Options, []);
  