anchor.diff:              throw(Err)
           end;
       _Else ->
  -        case couch_httpd:qs_value(Req, "batch") of
  -        "ok" ->
  -            % batch
  -            Doc = couch_doc_from_req(Req, DocId, couch_httpd:json_body(Req)),
  -        
  -            spawn(fun() ->
  -                    case catch(couch_db:update_doc(Db, Doc, [])) of
  -                    {ok, _} -> ok;
  -                    Error ->
  -                        ?LOG_INFO("Batch doc error (~s): ~p",[DocId, Error])
  -                    end
  -                end),
  -            send_json(Req, 202, [], {[
  -                {ok, true},
  -                {id, DocId}
  -            ]});
  -        _Normal ->
  -            % normal
  -            Body = couch_httpd:json_body(Req),
  -            Doc = couch_doc_from_req(Req, DocId, Body),
  -            update_doc(Req, Db, DocId, Doc, RespHeaders, UpdateType)
  -        end
  +        Body = couch_httpd:json_body(Req),
  +        Doc = couch_doc_from_req(Req, DocId, Body),
  +        update_doc(Req, Db, DocId, Doc)
       end;
   
   db_doc_req(#httpd{method='COPY'}=Req, Db, SourceDocId) ->
  
positive.code:     % open old doc
      Doc = couch_doc_open(Db, SourceDocId, SourceRev, []),
      % save new doc
      {ok, NewTargetRev} = couch_db:update_doc(Db,
          Doc#doc{id=TargetDocId, revs=TargetRevs}, []),
      % respond
      send_json(Req, 201,
          [{"ETag", "\"" ++ ?b2l(couch_doc:rev_to_str(NewTargetRev)) ++ "\""}],
          update_doc_result_to_json(TargetDocId, {ok, NewTargetRev}));
  
  db_doc_req(Req, _Db, _DocId) ->
      send_method_not_allowed(Req, "DELETE,GET,HEAD,POST,PUT,COPY").
  
negative.code:             Doc
      end,
      DocId = Doc2#doc.id,
      update_doc(Req, Db, DocId, Doc2);
  
  db_req(#httpd{path_parts=[_DbName]}=Req, _Db) ->
      send_method_not_allowed(Req, "DELETE,GET,HEAD,POST");
  