anchor.diff:  send_docs_multipart(Req, Results, Options1) ->
       OuterBoundary = couch_uuids:random(),
       InnerBoundary = couch_uuids:random(),
  -    {Options, CompressedAtts} =
  -    case couch_httpd:header_value(Req, "X-CouchDB-Send-Encoded-Atts") of
  -    "true" ->
  -        {[attachments, follows, att_encoding_info | Options1], true};
  -    _ ->
  -        {[attachments, follows | Options1], false}
  -    end,
  +    Options = [attachments, follows, att_encoding_info | Options1],
       CType = {"Content-Type", 
           "multipart/mixed; boundary=\"" ++ ?b2l(OuterBoundary) ++ "\""},
       {ok, Resp} = start_chunked_response(Req, 200, [CType]),
  
positive.code:         fun({ok, #doc{atts=Atts}=Doc}) ->
              JsonBytes = ?JSON_ENCODE(couch_doc:to_json_obj(Doc, Options)),
              {ContentType, _Len} = couch_doc:len_doc_to_multi_part_stream(
                      InnerBoundary, JsonBytes, Atts, CompressedAtts),
              couch_httpd:send_chunk(Resp, <<"\r\nContent-Type: ",
                      ContentType/binary, "\r\n\r\n">>),
              couch_doc:doc_to_multi_part_stream(InnerBoundary, JsonBytes, Atts,
                      fun(Data) -> couch_httpd:send_chunk(Resp, Data)
                      end, CompressedAtts),
               couch_httpd:send_chunk(Resp, <<"\r\n--", OuterBoundary/binary>>);
          ({{not_found, missing}, RevId}) ->
               RevStr = couch_doc:rev_to_str(RevId),
  
negative.code:             JsonBytes = ?JSON_ENCODE(couch_doc:to_json_obj(Doc, 
                      [attachments, follows|Options])),
              {ContentType, Len} = couch_doc:len_doc_to_multi_part_stream(
                      Boundary,JsonBytes, Atts, true),
              CType = {<<"Content-Type">>, ContentType},
              {ok, Resp} = start_response_length(Req, 200, [CType|Headers], Len),
              couch_doc:doc_to_multi_part_stream(Boundary,JsonBytes,Atts,
                      fun(Data) -> couch_httpd:send(Resp, Data) end, true)
          end;
      false ->
          send_json(Req, 200, Headers, couch_doc:to_json_obj(Doc, Options))
  