anchor.diff:      {500, error, Error}.
   
   send_error(Req, {method_not_allowed, Methods}) ->
  -    {ok, Req:respond({405, [{"Allow", Methods}], <<>>})};
  +    {ok, Req:respond({405, [{"Allow", Methods}] ++ server_header(), <<>>})};
   send_error(Req, {modified, Etag}) ->
  -    {ok, Req:respond({412, [{"Etag", Etag}], <<>>})};
  +    {ok, Req:respond({412, [{"Etag", Etag}] ++ server_header(), <<>>})};
   send_error(Req, {not_modified, Etag}) ->
  -    {ok, Req:respond({304, [{"Etag", Etag}], <<>>})};
  +    {ok, Req:respond({304, [{"Etag", Etag}] ++ server_header(), <<>>})};
   send_error(Req, Error) ->
       {Code, Json} = error_to_json(Error),
       ?LOG_INFO("HTTP Error (code ~w): ~p", [Code, Error]),
  
positive.code:             throw({not_found, missing});
          {Type, Bin} ->
              Resp = Req:respond({200, [
                  {"content-type", Type},
                  {"content-length", integer_to_list(couch_doc:bin_size(Bin))}
              ], chunked}),
              couch_doc:bin_foldl(Bin,
                  fun(BinSegment, []) ->
                      ok = Resp:write_chunk(BinSegment),
  
negative.code:     send_json(Req, Code, [], Value).
  
  send_json(Req, Code, Headers, Value) ->
      DefaultHeaders = [
          {"Content-Type", negotiate_content_type(Req)},
          {"Cache-Control", "must-revalidate"}
      ] ++ server_header(),
      Body = cjson:encode(Value),
      Resp = Req:respond({Code, DefaultHeaders ++ Headers, Body}),
      {ok, Resp}.
  
  start_json_response(Req, Code) ->
      start_json_response(Req, Code, []).
  
  start_json_response(Req, Code, Headers) ->
      DefaultHeaders = [
          {"Content-Type", negotiate_content_type(Req)},
          {"Cache-Control", "must-revalidate"}
      ] ++ server_header(),
      Req:respond({Code, DefaultHeaders ++ Headers, chunked}).
  
  end_json_response(Resp) ->
      Resp:write_chunk(""),
  