From e205011324717150cb5bd9e0cd9aa334071ab5ad Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Mon, 17 Jan 2011 11:35:48 +0000 Subject: Merged revision 1058674 from trunk Avoid unnecessary conversion to binary Mochiweb accepts IO lists. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1059889 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd.erl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index eb553c27..dc98957c 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -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) -> -- cgit v1.2.3