anchor.diff:  
   send_doc_efficiently(Req, #doc{atts=[]}=Doc, Headers, Options) ->
           send_json(Req, 200, Headers, couch_doc:to_json_obj(Doc, Options));
  -send_doc_efficiently(Req, #doc{atts=Atts}=Doc, Headers, Options) ->
  +send_doc_efficiently(#httpd{mochi_req = MochiReq} = Req,
  +    #doc{atts = Atts} = Doc, Headers, Options) ->
       case lists:member(attachments, Options) of
       true ->
  -        AcceptedTypes = case couch_httpd:header_value(Req, "Accept") of
  -            undefined       -> [];
  -            AcceptHeader    -> string:tokens(AcceptHeader, ", ")
  -        end,
  -        case lists:member("multipart/related", AcceptedTypes) of
  +        case MochiReq:accepts_content_type("multipart/related") of
           false ->
               send_json(Req, 200, Headers, couch_doc:to_json_obj(Doc, Options));
           true ->
  
positive.code:         send_doc(Req, Doc, Options);
      _ ->
          {ok, Results} = couch_db:open_doc_revs(Db, DocId, Revs, Options),
          AcceptedTypes = case couch_httpd:header_value(Req, "Accept") of
              undefined       -> [];
              AcceptHeader    -> string:tokens(AcceptHeader, ", ")
          end,
          case lists:member("multipart/mixed", AcceptedTypes) of
          false ->
              {ok, Resp} = start_json_response(Req, 200),
              send_chunk(Resp, "["),
  
negative.code:                     {[{<<"_rev">>, ?l2b(Rev)},{<<"_deleted">>,true}]}))
      end;
  
  db_doc_req(#httpd{method = 'GET', mochi_req = MochiReq} = Req, Db, DocId) ->
      #doc_query_args{
          rev = Rev,
          open_revs = Revs,
  