anchor.diff:          _ ->
               false
       end.
  +
  +-spec monitor_attachments(#att{} | [#att{}]) -> [reference()].
  +monitor_attachments(#att{}=Att) ->
  +    monitor_attachments([Att]);
  +monitor_attachments(Atts) when is_list(Atts) ->
  +    [monitor(process, Fd) || #att{data={Fd,_}} <- Atts].
  +
  +demonitor_refs(Refs) when is_list(Refs) ->
  +    [demonitor(Ref) || Ref <- Refs].
  
positive.code:     couch_httpd:send_chunk(Resp, <<"--", OuterBoundary/binary>>),
      lists:foreach(
          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, true),
  
negative.code:             {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
          after
              demonitor_refs(Refs)
          end;
      false ->
          send_json(Req, 200, Headers, couch_doc:to_json_obj(Doc, Options))
  