anchor.diff:      {Pos, [RevId|_]} = Rev,
       Url = lists:flatten([DbUrl, url_encode(Id), "/", url_encode(?b2l(Name)),
           "?rev=", ?b2l(couch_doc:rev_to_str({Pos,RevId}))]),
  -    ?LOG_DEBUG("Attachment URL ~p", [Url]),
  +    ?LOG_DEBUG("Attachment URL ~s", [Url]),
       {ok, RcvFun} = make_attachment_stub_receiver(Url, Headers, Name, 
           Type, Length),
       {Name, {Type, {RcvFun, Length}}}.
  
positive.code:     ReqId = 
      case ibrowse:send_req_direct(Conn, Url, Headers, get, [], Opts, infinity) of
          {ibrowse_req_id, X} -> X;
          {error, _Reason} -> exit(attachment_request_failed)
      end,
      
      %% tell our receiver about the ReqId it needs to look for
  
negative.code:     
      JsonResults = case length(Revs) > MaxN of
      false ->
          Url = ?l2b(BaseUrl ++ "&open_revs=" ++ ?JSON_ENCODE(Revs)),
          do_http_request(Url, get, Headers);
      true ->
          {_, Rest, Acc} = lists:foldl(
          fun(Rev, {Count, RevsAcc, AccResults}) when Count =:= MaxN ->
              QSRevs = ?JSON_ENCODE(lists:reverse(RevsAcc)),
              Url = ?l2b(BaseUrl ++ "&open_revs=" ++ QSRevs),
              {1, [Rev], AccResults++do_http_request(Url, get, Headers)};
          (Rev, {Count, RevsAcc, AccResults}) ->
              {Count+1, [Rev|RevsAcc], AccResults}
          end, {0, [], []}, Revs),
          Acc ++ do_http_request(?l2b(BaseUrl ++ "&open_revs=" ++
              ?JSON_ENCODE(lists:reverse(Rest))), get, Headers)
      end,
      
      Results =
  