diff --git a/cloudcmd.js b/cloudcmd.js index ce133bd9..d4beed6a 100644 --- a/cloudcmd.js +++ b/cloudcmd.js @@ -224,6 +224,7 @@ getContent(name, function(error, data, isFile) { var json, + NOT_LOG = true, query = main.getQuery(request), isJSON = Util.isContainStr(query, 'json'); @@ -235,7 +236,7 @@ } else if (isJSON) { p.name +='.json'; json = Util.stringifyJSON(data); - main.sendResponse(p, json, true); + main.sendResponse(p, json, NOT_LOG); } else readIndex(data, function(error, data) { p.name = INDEX_PATH; @@ -243,7 +244,7 @@ if (error) main.sendError(error); else - main.sendResponse(p, data, true); + main.sendResponse(p, data, NOT_LOG); }); }); } diff --git a/lib/server/rest.js b/lib/server/rest.js index 4ab1641e..0a32805f 100644 --- a/lib/server/rest.js +++ b/lib/server/rest.js @@ -132,7 +132,8 @@ switch (p.request.method) { case 'GET': onFSGet(query, p.name, function(error, data, isFile) { - var str; + var str, + NOT_LOG = true; if (error) sendError(params, error); @@ -141,7 +142,7 @@ else { p.name += '.json'; str = Util.stringifyJSON(data); - sendResponse(p, str, true); + sendResponse(p, str, NOT_LOG); } });