couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1059889 - /couchdb/branches/1.1.x/src/couchdb/couch_httpd.erl
Date Mon, 17 Jan 2011 11:35:48 GMT
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) ->



Mime
View raw message