Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 14016 invoked from network); 17 Jan 2011 11:36:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jan 2011 11:36:20 -0000 Received: (qmail 92642 invoked by uid 500); 17 Jan 2011 11:36:20 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 92519 invoked by uid 500); 17 Jan 2011 11:36:18 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 92506 invoked by uid 99); 17 Jan 2011 11:36:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jan 2011 11:36:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jan 2011 11:36:15 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 792BC23889E1; Mon, 17 Jan 2011 11:35:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1059889 - /couchdb/branches/1.1.x/src/couchdb/couch_httpd.erl Date: Mon, 17 Jan 2011 11:35:48 -0000 To: commits@couchdb.apache.org From: fdmanana@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110117113548.792BC23889E1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: fdmanana Date: Mon Jan 17 11:35:48 2011 New Revision: 1059889 URL: http://svn.apache.org/viewvc?rev=1059889&view=rev Log: Merged revision 1058674 from trunk Avoid unnecessary conversion to binary Mochiweb accepts IO lists. Modified: couchdb/branches/1.1.x/src/couchdb/couch_httpd.erl Modified: couchdb/branches/1.1.x/src/couchdb/couch_httpd.erl URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/src/couchdb/couch_httpd.erl?rev=1059889&r1=1059888&r2=1059889&view=diff ============================================================================== --- couchdb/branches/1.1.x/src/couchdb/couch_httpd.erl (original) +++ couchdb/branches/1.1.x/src/couchdb/couch_httpd.erl Mon Jan 17 11:35:48 2011 @@ -612,9 +612,7 @@ send_json(Req, Code, Headers, Value) -> {"Content-Type", negotiate_content_type(Req)}, {"Cache-Control", "must-revalidate"} ], - Body = list_to_binary( - [start_jsonp(Req), ?JSON_ENCODE(Value), end_jsonp(), $\n] - ), + Body = [start_jsonp(Req), ?JSON_ENCODE(Value), end_jsonp(), $\n], send_response(Req, Code, DefaultHeaders ++ Headers, Body). start_json_response(Req, Code) ->