couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <>
Subject Re: [RESULT]: Accept newline patch into CouchDB for 0.9 (Was: Re: VOTE: accept newline patch into CouchDB for 0.9)
Date Mon, 23 Feb 2009 21:49:56 GMT
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

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
    send_chunk(Resp, RowFront2 ++  ?JSON_ENCODE(JsonObj)).



View raw message