anchor.diff:      send_chunk(Resp, [Prepend, ?JSON_ENCODE(Row)]),
       {ok, {",\r\n", Resp}};
   view_callback(complete, {nil, Resp}) ->
  -    send_chunk(Resp, "{\"rows\":[]}"),
  -    end_json_response(Resp),
  -    {ok, Resp};
  +    send_chunk(Resp, "{\"rows\":[]}");
   view_callback(complete, {_, Resp}) ->
  -    send_chunk(Resp, "\r\n]}"),
  -    end_json_response(Resp),
  -    {ok, Resp};
  +    send_chunk(Resp, "\r\n]}");
   view_callback({error, Reason}, {_, Resp}) ->
  -    chttpd:send_chunked_error(Resp, Reason).
  +    {Code, ErrorStr, ReasonStr} = chttpd:error_info(Reason),
  +    Json = {[{code,Code}, {error,ErrorStr}, {reason,ReasonStr}]},
  +    send_chunk(Resp, [$\n, ?JSON_ENCODE(Json), $\n]).
   
   extract_view_type(_ViewName, [], _IsReduce) ->
       throw({not_found, missing_named_view});
  
positive.code:     [send_json/2,send_json/3,send_json/4,send_method_not_allowed/2,send_chunk/2,
      start_json_response/2, start_json_response/3, end_json_response/1,
      send_chunked_error/2]).
  
  design_doc_view(Req, Db, DDoc, ViewName, Keys) ->
      Group = couch_view_group:design_doc_to_view_group(DDoc),
  
negative.code:     },
      QueryArgs = lists:foldl(fun({K, V}, Args2) ->
          validate_view_query(K, V, Args2)
      end, Args, QueryParams),
  
      GroupLevel = QueryArgs#view_query_args.group_level,
      case {ViewType, GroupLevel, IsMultiGet} of
  