anchor.diff:  
   -module(chttpd_db).
   -include_lib("couch/include/couch_db.hrl").
  +-include_lib("couch_mrview/include/couch_mrview.hrl").
   
   -export([handle_request/1, handle_compact_req/2, handle_design_req/2,
       db_req/2, couch_doc_open/4,handle_changes_req/2,
  
positive.code: bad_action_req(#httpd{path_parts=[_, _, Name|FileNameParts]}=Req, Db, _DDoc) ->
      db_attachment_req(Req, Db, <<"_design/",Name/binary>>, FileNameParts).
  
  handle_design_info_req(#httpd{method='GET'}=Req, Db, #doc{id=Id} = DDoc) ->
      {ok, GroupInfoList} = fabric:get_view_group_info(Db, DDoc),
      send_json(Req, 200, {[
          {name,  Id},
          {view_index, {GroupInfoList}}
      ]});
  
  
negative.code:     db_attachment_req(Req, Db, DocId, FileNameParts).
  
  all_docs_view(Req, Db, Keys) ->
      Args0 = couch_mrview_http:parse_params(Req, Keys),
      ETagFun = fun(Sig, Acc0) ->
          couch_mrview_http:check_view_etag(Sig, Acc0, Req)
      end,
      Args = Args0#mrargs{preflight_fun=ETagFun},
      {ok, Resp} = couch_httpd:etag_maybe(Req, fun() ->
          VAcc0 = #vacc{db=Db, req=Req},
          fabric:all_docs(Db, fun couch_mrview_http:view_cb/2, VAcc0, Args)
      end),
      case is_record(Resp, vacc) of
          true -> {ok, Resp#vacc.resp};
          _ -> {ok, Resp}
      end.
  
  db_doc_req(#httpd{method='DELETE'}=Req, Db, DocId) ->
      % check for the existence of the doc to handle the 404 case.
  