[Groonga-commit] groonga/express-droonga [master] Don't do pretty print for REST API responses

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Mar 4 10:58:53 JST 2013


YUKI Hiroshi	2013-03-04 10:58:53 +0900 (Mon, 04 Mar 2013)

  New Revision: de240c6e5121225998e503d6aba7f0eae841795f
  https://github.com/groonga/express-droonga/commit/de240c6e5121225998e503d6aba7f0eae841795f

  Log:
    Don't do pretty print for REST API responses

  Modified files:
    lib/frontend/rest-adaptor.js

  Modified: lib/frontend/rest-adaptor.js (+2 -2)
===================================================================
--- lib/frontend/rest-adaptor.js    2013-03-01 13:56:52 +0900 (71d2985)
+++ lib/frontend/rest-adaptor.js    2013-03-04 10:58:53 +0900 (4f0704a)
@@ -23,7 +23,7 @@ function createHandler(params) {
         if (error) {
           var body = envelope && envelope.body || null;
           response.contentType('application/json');
-          response.send(body, error);
+          response.send(JSON.stringify(body), error);
         } else {
           var body = envelope.body;
           if (definition.toClient) {
@@ -31,7 +31,7 @@ function createHandler(params) {
             body = result[1];
           }
           response.contentType('application/json');
-          response.send(body, 200);
+          response.send(JSON.stringify(body), 200);
         }
       },
       { timeout: timeout }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index