On Mon, Feb 23, 2009 at 07:48:46PM +0000, Noah Slater wrote:
> On Mon, Feb 23, 2009 at 10:48:22AM +0100, Jan Lehnardt wrote:
> > I haven't seen any compelling pro- arguments that can't be solved
> > on the client side (curl -w\\n e.g.).
> 
> Having to solve on the client side IS the problem. :)

Indeed. And the current situation is anomalous: if there are objections to a
trailing newline, surely newlines should be removed from within view results
too. (I don't want this though; I want them to be kept and the trailing one
added).

Incidentally, I looked at the code and the internal newlines are \r\n - so
the trailing one should be this too, IMO.

send_json_view_row(Resp, Db, {{Key, DocId}, Value}, RowFront, IncludeDocs) ->
    JsonObj = view_row_obj(Db, {{Key, DocId}, Value}, IncludeDocs),
    RowFront2 = case RowFront of
    nil -> ",\r\n";
    _ -> RowFront
    end,
    send_chunk(Resp, RowFront2 ++  ?JSON_ENCODE(JsonObj)).

Regards,

Brian.

Reply via email to